-
Notifications
You must be signed in to change notification settings - Fork 114
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
NPE because of the DummyListField.$get #1058
Labels
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Did that issue ever got fixed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: