This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hints engine ignore equals method tests. Equals method return false, if argument is null. This method can be considered for possible null hint. Example code: @Nonnull public static String test(@Nullable String value){ if(!"test".equals(value)){ return "something"; } return value; } Netbeans report possible null on "return value;". But this is not possible, because of equals test. It is easy to understand for programmer. I'm not sure, if it would be possible to include this in hints engine.
*** This bug has been marked as a duplicate of bug 226083 ***
We can assume that if a.equals(b), then b != null - otherwise equals contract would be severely broken for a.