You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/05/17 08:36:41 UTC

[GitHub] [netbeans] ExE-Boss opened a new issue, #4125: NPECheck (the “Null Pointer Dereference” hint) should support `@Target(TYPE_USE)` annotations

ExE-Boss opened a new issue, #4125:
URL: https://github.com/apache/netbeans/issues/4125

   ### Apache NetBeans version
   
   Apache NetBeans 13
   
   ### What happened
   
   Using a `@NonNull` or `@Nullable` annotation that has <code>\@[Target][java.lang.annotation.Target]\([TYPE_USE][java.lang.annotation.ElementType#TYPE_USE]\)</code> causes the “Null Pointer Dereference” hint to not work.
   
   ### How to reproduce
   
   Use a `@NotNull` or `@Nullable` annotation that has `@Target(TYPE_USE)`, such as the ones provided by [JSpecify](https://jspecify.dev/).
   
   ### Did this work correctly in an earlier version?
   
   No
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   OpenJDK Runtime Environment [Temurin](https://adoptium.net/)-18.0.1+10 (build 18.0.1+10)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   Nullity annotations that make use of **Java 8**’s <code>[ElementType][java.lang.annotation.ElementType].[TYPE_USE][java.lang.annotation.ElementType#TYPE_USE]</code> are becoming more and more common as time goes on[^1].
   
   [^1]: They’re already in use in [Guava](https://github.com/google/guava)
   
   [java.lang.annotation.Target]: https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/annotation/Target.html
   [java.lang.annotation.ElementType]: https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/annotation/ElementType.html
   [java.lang.annotation.ElementType#TYPE_USE]: https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/annotation/ElementType.html#TYPE_USE
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NPECheck (the “Null Pointer Dereference” hint) should support `@Target(TYPE_USE)` annotations [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #4125:
URL: https://github.com/apache/netbeans/issues/4125#issuecomment-1817930117

   @ExE-Boss can you post a minimal example which uses the annotation and causes the hint to not work?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists