XStream

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>

Activity

Hide
Joerg Schaible added a comment -

Fixed in head revision. Thanks for report.

Show
Joerg Schaible added a comment - Fixed in head revision. Thanks for report.
Hide
Joerg Schaible added a comment -

Closing issues before next release.

Show
Joerg Schaible added a comment - Closing issues before next release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: