-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
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
CXFXJC-47: XJC DefaultValue plugin uses JAXBElement that does not have a default constructor #129
Conversation
@marcelhdl thank you bringing this issue, we probably should step further and detect such cases in the plugin by verifying if the default constructor exists. Would you be willing to make this change? Thank you! |
@reta I just gave it a try, but while trying it out - i got stuck. I guess we don't know if there are default-constructors for each class because we aren't having all of them in the classpath at runtime. |
I see, thank you @marcelhdl , may be whitelisting could be better here (for JAXB classes at least): it seems like no matter what, for |
@reta sorry for my late response, i am runnning out of time atm. |
Not a problem @marcelhdl , thank you a lot for spending your time on that, I will pick it up shortly, looks like an issue worth fixing. |
Hi @reta, how is it going. |
Hey @marcelhdl , slipped through my list, will wrapping it up shortly, sorry about that |
…e a default constructor
@reta Looks good to me :) |
Thank you @marcelhdl , I will backport that to all maintenance branches once merged (a bit later today I hope) |
…e a default constructor (#129) * Added new Parameter to exclude specific classes from default value generation * CXFXJC-47: XJC DefaultValue plugin uses JAXBElement that does not have a default constructor --------- Co-authored-by: Marcel Hödl <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
…e a default constructor (#129) * Added new Parameter to exclude specific classes from default value generation * CXFXJC-47: XJC DefaultValue plugin uses JAXBElement that does not have a default constructor --------- Co-authored-by: Marcel Hödl <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
@reta this would be awesome!! |
@reta do you already know when the two new versions are released? |
@marcelhdl there is no ETA as of today, but hopefully soon enough |
@reta thanks for the quick response. |
No, thank you @marcelhdl , it is already in 4.0.x and 3.3.x branches |
Hi @reta, any news on the ETA? |
Hi @marcelhdl , we have just cut Apache CXF releases, I think we should be able to make one for cxf-xjc-utils shortly, thank you |
We've found a minor bug when using extensions and substitiongroups.
The defaultvalue-plugin generates a
new JAXBElement
expression, which isn't valid java code, as JAXBElement does not have a default constructor.I've added a fix and a xsd-file for the corresponding test, to reproduce this bug.