Failed to use @XStreamConverter to specify converter with non-default constructor and pass equal values into constructor #35

Closed
emamedov opened this Issue Jan 13, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@emamedov

Hi.

XStream: 1.4.8

I faced issue that is described here (http://stackoverflow.com/questions/27926281/is-it-possible-to-use-namedmapconverter-in-annotation-how). We can't use @XStreamConverter annotation to specify converter if it has non-default constructor and we want to pass into this constructor equal values for some arguments (for example, NamedMapConverter with keyAsAttribute=true and valueAsAttribute=true). Proposed in stackoverflow workaround works but it is not a good solution

@joehni

This comment has been minimized.

Show comment
Hide comment
@joehni

joehni Jan 15, 2016

Member

Hi, I know there was a reason for the comparison, but I don't remember. I'll have to investigate. Basically the original poster is right, that it fails badly for two equal values, especially if you have to provide multiple booleans.

It would have helped though, if the OP made request here or asked at XStream's mailing list one year ago.

Member

joehni commented Jan 15, 2016

Hi, I know there was a reason for the comparison, but I don't remember. I'll have to investigate. Basically the original poster is right, that it fails badly for two equal values, especially if you have to provide multiple booleans.

It would have helped though, if the OP made request here or asked at XStream's mailing list one year ago.

@joehni joehni self-assigned this Jan 15, 2016

joehni added a commit that referenced this issue Feb 12, 2016

@joehni joehni closed this in b522540 Feb 12, 2016

@joehni joehni added the bug label Feb 12, 2016

@joehni joehni added this to the 1.4.x milestone Feb 12, 2016

@joehni joehni modified the milestones: 1.4.9, 1.4.x Mar 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment