Closed mattrpav closed 4 years ago
To recreate:
mvn generate-sources
To work around:
Edit pom.xml and set jaxb.xew.plugin = 1.2 mvn generate-sources
Sample project: jaxb2-xew-bug.zip
Question to jaxb2-basics team: Why FieldUtils.getPossibleTypes():204 uses outline model and not the code model to retrieve types? Also I think that to implement such simple thing as equals()
or hashCode()
one don't need to collect all possible types: there is one and only one type.
@dmak I can't say exactly anymore, but I think you can't retrieve this information from the rendered code model. I think you'd only get "lowes common denominator" there instead of individual possible type. Generally, I prefer not to infer anything from the rendered code model as it is, well, a rendered projection of the model/outline.
I understand your position but from other side if the class has T field
, what are the other options for the type to use in equals()
? Isn't it simply T tmp = getField(); if (tmp != null) { boolean result = tmp.equals(other.getField()); }
?
Closing this issue.. fixed on the xew side. Project works with xew 1.11 (and possibly earlier. Bug marked fixed in xew 1.8)
While using jaxb-xew-plugin 1.7 and jaxb2-basics 0.13.1 a ConcurrentModificationException is thrown.
Downgrading jaxb-xew-plugin to 1.2 resolves the issue
Linked to jaxb-xew-plugin issue: https://github.com/dmak/jaxb-xew-plugin/issues/48
Full stacktrace: