m-i-0 opened a new issue, #6392:
URL: https://github.com/apache/netbeans/issues/6392

   ### Apache NetBeans version
   
   Apache NetBeans 18
   
   ### What happened
   
   Editor is showing a warning about unboxing possibly null value when the 
check for possibly null value is added. 
   
   ### How to reproduce
   
   ```
   public class NewClass {
       
       public void test(TestClass arg) {
           long testVal1 = arg.getValue(); //this line should/could show a 
warning, but it doesn't
           long testVal2 = arg.getValue() != null?arg.getValue():0; //this line 
shouldn't show a warning, but it does
       }
       
       
       public class TestClass {
           private final Long value = null;
           
           public Long getValue() {
               return value;
           }
       }
   }
   ```
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10 Pro (2H22) running on amd64; Cp1250; en_US (nb)
   
   ### JDK
   
   Java 11; OpenJDK 64-Bit Server VM 11+28
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to