XStream
  1. XStream
  2. XSTR-430

Omit field is ignored if field type is marked useAttributeFor

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.3
    • Component/s: Core
    • Labels:
      None

      Description

      @XStreamAlias("User")
      class User {
      String name;
      String password;
      }

      xstream.useAttributeFor(String.class);
      xstream.omitField(User.class, "password");

      Upon serialization I get: (password should not be there!)
      <User name="abc" password="pass"/>

      However if userAttributeFor is not used I get (Correct password is ignored)
      <User>
      <name>abc</name>
      </User>

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Misko Hevery
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: