-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix #11507 getAttribute javadoc #11843
Conversation
yup but which one :) https://stackoverflow.com/questions/4963300/which-notnull-java-annotation-should-i-use this list is missing the new jakarta one and this other new one coming https://jspecify.dev/ |
@olamy fortunately or unfortunately, it doesn't matter. You can declare an annotation with the same name in any package and IDEs typically treat it correctly. You could declare your own |
@cowwoc That makes me smile! I often say facetiously :
This @NotNull situation perfectly captures both. I'll open an issue for us to consider this at some stage. |
opened #11848 |
nah It's a problem. I don't mind IDE. But I wonder about build tools you will eventually need to bind a different plugin for each annotation :) |
@olamy Are you aware of any tools that bind against a fully-qualified annotation name? I wouldn't be surprised if this was the case, but I've never seen one. Every single tool I've seen ignored the package name (by design) precisely because everyone was declaring their own. |
@cowwoc I didn't check but even if not using the fqcn the simple name is already different :)
|
Interestingly enough, it turns out that IntelliJ treats @CheckReturnValue differently from nullability annotations. The former ignores the package name. The latter only checks for the following fully-qualified annotation names:
They have a similar list for not-null annotations. So I take it back, you can't just create your own annotation (unless you want to go around convincing all the IDEs to add support for it). |
The <dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
<version>2.3.0</version>
</dependency> It's pretty lightweight too ...
The pom also has no dependencies, or even a parent pom. |
Fix #11507 getAttribute javadoc.
As some stage we should consider @nullable or @NotNull annotations...