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
Add <nullableAnnotationTargetElementType> and <nonnullAnnotationTargetElementType> to support generating ElementType.TYPE_USE annotations #10759
Comments
Thanks a lot for your report. The existing functionality assumes that the annotation supports We've had this feature for a while now, always based on the existing assumptions. We could fix this by adding an additional set of configuration flags:
Until this is available, you can use an alternative set of annotations, e.g. the |
You seem to see this as a regression based on the fact that we now generate this annotation on |
I did not get compilation errors before, I'm assuming that the issue here is that collision having a schema called |
Oh, I get it now. The correct syntax in that case would be It's not really a new issue, although indeed, it didn't manifest to you before. If there's a conflict with an import (e.g. when using <fullyQualifiedTypes>java.lang.Integer</fullyQualifiedTypes> You'd get the same problem, even before 3.14. You can try it with the above I don't think we can solve this automatically. An additional configuration will be needed to specify whether the annotation is |
I can think of three workarounds for you right now:
|
Ok, I will change to It would be great that the generator could automatically detect if it's only a |
Yes that sounds reasonable for a set of well-known annotations |
Fwiw, I'm using Checker Framework annotations ( See https://checkerframework.org/manual/#faq-array-syntax-meaning for type annotations with arrays. For now I just don't use nullable annotations, as my checker (Nullaway) is configured to treat |
A duplicate of this #12581. I think this has sufficient interest for inclusion in 3.16. I'll slightly adapt the specification here: #10759 (comment) There are 3 types of behaviour for
|
Expected behavior
Generated source code should be valid.
Actual behavior
Illegally placed annotation: type annotations must directly precede the simple name of the type they are meant to affect (or the [] for arrays)
Steps to reproduce the problem
PostgreSQL database with a
catalog
schema has conflict withorg.jooq.Catalog
generating the nullable annotations in jOOQ 3.14.0, in 3.13.5 this annotation is not added to the method.Versions
The text was updated successfully, but these errors were encountered: