-
Notifications
You must be signed in to change notification settings - Fork 16
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
Static metamodel generation produces uncompilable code under JDK 21 #257
Comments
ledsoft
added a commit
that referenced
this issue
Jul 16, 2024
ledsoft
added a commit
that referenced
this issue
Jul 17, 2024
…ons in element type declaration. In JDK 17 and before, annotations were added before type ("@annotation java.util.Set"), now, they are inserted into the type ("java.util@Annotation Set"), so we cannot rely on TypeMirror.toString when determining type.
ledsoft
added a commit
that referenced
this issue
Jul 17, 2024
ledsoft
added a commit
that referenced
this issue
Jul 17, 2024
ledsoft
added a commit
that referenced
this issue
Jul 17, 2024
…ons in element type declaration. In JDK 17 and before, annotations were added before type ("@annotation java.util.Set"), now, they are inserted into the type ("java.util@Annotation Set"), so we cannot rely on TypeMirror.toString when determining type.
ledsoft
added a commit
that referenced
this issue
Jul 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I have a JOPA entity class with fields annotated with annotation with target
ElementType.TYPE_USE
(for example, Java validation API annotations@NotNull
etc.), the static metamodel generator produces uncompilable output, because it attempts to insert the annotation text into the type field definition in the generated static metamodel.For example, for the following attribute definition:
it produces
and messes up the imports, adding
import String;
.This happens under JDK 21, JDK 17 output is fine. Other annotation targets do not cause this issue, only
ElementType.TYPE_USE
.The text was updated successfully, but these errors were encountered: