Open Tomas-Kraus opened 9 years ago
@glassfishrobot Commented Reported by lexi
@glassfishrobot Commented lexi said: I've made a temporal fix in form of a plugin:
@glassfishrobot Commented Was assigned to yaroska
@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-1058
Did that issue ever got fixed?
Today I've spent a few hours hunting an NPE bug.
I was trying to add the generateMixedExtensions="true" feature to a working project and started getting an NPE:
After some debugging I've found out that the NPE was thrown because the passed JMethod was null.
And that was because of the DummyListField.$get - a getter for the dummy list field. $get is a private field which is never initialized in the code, but used in the field accessor, for instance:
This leads to $target.invoke(...) with null and consequently to the NPE during code generation.
I think it was forgotten to initialize the $get field. Other list fields have something like:
I think this appeared here because the generateMixedExtensions="true" feature probably creates a dummy field. Should it be dummy, actually? Anyway, somehow with that feature a DummyListField is created and it has a bug.