We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE
The ElementOutlineImpl class omits the serialVersionUID field when specified by
serialVersionUID
<jaxb:globalBindings> <jaxb:serializable uid="20231001" /> </jaxb:globalBindings>
PROPOSAL
Add a method to ElementOutlineImpl to implement the serializable option and call the method at the start of the if(ei.hasClass()) {...} block.
if(ei.hasClass()) {...}
Method: serializableOption(...)
/** * Serializable option to implement the {@link Serializable} interface * and <code>serialVersionUID</code> field. * * @param bg The XJC bean generator. * @param implClass The implementation class. */ private void serializableOption(BeanGenerator bg, JDefinedClass implClass) { if (bg.getModel().serializable) { JClass serRef = bg.getCodeModel().ref(Serializable.class); if ( !serRef.isAssignableFrom(implClass) ) implClass._implements(Serializable.class); if ( !implClass.fields().containsKey("serialVersionUID") ) { if (bg.getModel().serialVersionUID != null) { implClass.field( JMod.PRIVATE | JMod.STATIC | JMod.FINAL, bg.getCodeModel().LONG, "serialVersionUID", JExpr.lit(bg.getModel().serialVersionUID)); } } } }
The text was updated successfully, but these errors were encountered:
Fix issue eclipse-ee4j#1748 and eclipse-ee4j#1750
58c5886
dcf4701
Fix issue #1748 and #1750
d1c27f9
025bd96
(cherry picked from commit d1c27f9)
6bd4d79
Successfully merging a pull request may close this issue.
ISSUE
The ElementOutlineImpl class omits the
serialVersionUID
field when specified byPROPOSAL
Add a method to ElementOutlineImpl to implement the serializable option and call the method at the start of the
if(ei.hasClass()) {...}
block.Method: serializableOption(...)
The text was updated successfully, but these errors were encountered: