-
Notifications
You must be signed in to change notification settings - Fork 101
JAXBElement to implement equals and hashCode #57
Comments
Reported by lexi |
Was assigned to snajper |
ryan_shoemaker said: Feel free to crack open the source and submit a patch. I'll make sure that the |
lexi said: |
File: JAXBElement.java |
lexi said: |
File: JAXBElementTest.java |
lexi said: |
ryan_shoemaker said: |
@jfialli said: |
lexi said: |
kohsuke said: The equals and the hashCode methods can be generated for the beans, which only |
@jfialli said: The contract between hashCode() and equals() is if two instances |
lexi said:
Therefore we are free to implement whatever equality semantics we want.
Not necessarily. By default equals() does identity comparison which seems
What I need and what I think to be quite logical is that JAXBElement DOES value |
@jfialli said: Preference is for javax.xml.bind.JAXBElement and schema derived generated value Note that under certain circumstances, JAXB 2.0 RI is generating schema-derived I would be fine with both JAXBElement and @XmlRootElement class using values for Minimally, if JAXBElement.equals was to implement value equality, JAXB 2.0 would |
kohsuke said: |
kohsuke said: I guess for the purpose of the equals() plugin, the bean that refers to |
skaffman said: |
lexi said: I still think hashCode() and equals() must be defined for JAXBElement. However http://confluence.highsource.org/display/J2B/Equals+plugin |
This issue was imported from java.net JIRA JAXB-57 |
Hi.
javax.xml.bind.JAXBElement currently does not override equals(...) and
hashCode() methods. Since this class is used to wrap "real" values, it is
desirable to implement these methods so that they take hashCode() and
equals(...) of the wrapped value into an account.
Basically, hashCode() and equals(...) should operate with name, declaredType,
scope, nil AND value fields.
I can implement these methods, but I need to know, where to find the jaxb-api
project sources...
Bye.
/lexi
Environment
Operating System: All
Platform: All
Affected Versions
[2.0 EA1]
The text was updated successfully, but these errors were encountered: