-
Notifications
You must be signed in to change notification settings - Fork 10
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
Error for (multiple) Field Annotations in Pojo #24
Comments
This is actually a bug in the JDK, believe it or not. https://bugs.openjdk.org/browse/JDK-8281238?jql=text%20~%20%22toString%20of%20annotation%22 I get the types for code generation from
So that issue should be re-opened / re-reported so that it works with multiple annotations. There is technically a path where I reimplement that method but its a mountain of work. Separately, the reason those annotations appear in the getters is because they are "type use" annotations.
A So I don't think its conceptually possible to not have them in the getters and setters (as formulated). The bigger issue is that |
ah yes, that explains it. The "NotNull" and "Size" Annotations are both "type use" annotations, so as you said they can (should) be part of the Setter/Getter. |
@funkrusher I submitted the bug report...and now we wait. I am a bit embarrassed I didn't notice that sooner. I made this minimum reproducer that i'll attach to the bug report. |
When a Pojo has multiple Bean-Annotations on a field, magic-bean crashes during code-generation.
Following example:
Following error during code-generation:
The generated Getter looks as follow, and is invalid:
Expected Result:
The text was updated successfully, but these errors were encountered: