You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for the great plugin! Although there is the jaxb2-basics alternative, I prefer this one, because it doesn't require any additional runtime dependency (I use Guava most of the time therefore it's not really a new one for me) and the generated code is more readable.
Unfortunately there is a bug which causes me to switch back to the "jaxb2-basics" plugin which behaves correctly.
I have the following xsd field: <element name="pdf" type="base64Binary"/>
which generates protected byte[] pdf;
in the Java class
You are then using Objects.equal(this.pdf, o.pdf) for the comparison which results in false even if the arrays are equal.
I guess the proper way would be to compare arrays with Arrays.equals(this.pdf, o.pdf) instead, which returns the correct result.
The text was updated successfully, but these errors were encountered:
Hi @afdia, glad you like it! I agree - arrays should be compared by their entries. I can't find my example setup to test it but, guided by the types, #6 should do it. Could you maybe give it a short review?
First of all thanks for the great plugin! Although there is the jaxb2-basics alternative, I prefer this one, because it doesn't require any additional runtime dependency (I use Guava most of the time therefore it's not really a new one for me) and the generated code is more readable.
Unfortunately there is a bug which causes me to switch back to the "jaxb2-basics" plugin which behaves correctly.
I have the following xsd field:
<element name="pdf" type="base64Binary"/>
which generates
protected byte[] pdf;
in the Java class
You are then using
Objects.equal(this.pdf, o.pdf)
for the comparison which results in false even if the arrays are equal.I guess the proper way would be to compare arrays with
Arrays.equals(this.pdf, o.pdf)
instead, which returns the correct result.The text was updated successfully, but these errors were encountered: