-
Notifications
You must be signed in to change notification settings - Fork 4
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 JSpecify annotations to defaults #88
Comments
@jvz, can you list which tools currently support those annotations? I am mostly interested in Eclipse, IDEA, Spotbugs and some tool like NullAway or Checker Framework that guarantees that the code is NPE-free. |
I have no idea if any support this yet. I like the annotation scheme at least, though, if we want to use our own packaged annotations instead based on JSR 305 like I tried out before. That approach at least works with existing tools until JSpecify is directly supported. |
I just noticed that this can be done directly in Log4j for now. This will make it simpler to apply any rewrites to the annotations as tooling catches up. See apache/logging-log4j2@2da4108 for the aliasing. |
IntelliJ supports it (JetBrains are a member of the jspecify group - https://jspecify.dev/about) No idea on Spotbugs/Eclipse I'm afraid. |
This adds [`jspecify`](https://jspecify.dev/) to the dependency management, a common effort of multiple Java tool developers to provide a common set of nullability annotations. Fixes apache#88.
As noted in https://issues.apache.org/jira/browse/LOG4J2-1477, JSpecify is the project specifying the one true nullability annotation standard. I experimented with creating copies of those annotations that use the JSR 305 nullability annotations to implement it, but it seems like it'd be easier to just use these annotations directly since they're only required at compile time. The use of these annotations would supersede any use of the old JSR annotations.
The text was updated successfully, but these errors were encountered: