Closed Lmh-java closed 2 months ago
I can confirm that we currently don't treat these two annotations the same. You're right that we haven't added support for this kind of aliasing because JSR 305 is abandoned, but also we haven't done so because no one has asked about it, until now :)
I opened a PR (#6508) to add support for the alias - it's pretty straightforward on our end. Hopefully it will appear in the next Checker Framework release.
Thanks a lot for your reply and pull request. I truly appreciate that. :) 👍
Hi, I am a contributor to Checkstyle. I am working on resolving the violation attached below.
Relevant code:
However, it seems that
checker-framework
does not support the@Nonnegative
annotation fromjavax.annotation
. (I guess it is because JSR 305 is abandoned?) When I was trying to use@Nonnegative
(from Javax) to replace@NonNegative
(from Checker Framework), the above error would still be given. In our case, it would be nice if we just original Java annotation instead of introducing a new one.I just want to confirm whether it is true that
checker-framework
only supports 3 annotations from Javax (as stated here https://checkerframework.org/releases/2.3.1/api/index.html?javax/annotation/package-summary.html), excluding@Nonnegative
. Do you have some recommendations for solving this problem? Thank you very much!