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.
Caret operator (^) produces this hint inappropriately: 1 private boolean testBug(Object o1, Object o2) { 2 if ((o1 == null ^ o2 == null) || o1 != null) { 3 return true; 4 } 5 return false; 6 } On line 2 "o1 != null" is highlighted with "Unecessary test for null - expression is never null". The first part of the test returns true if exactly one of o1 or o2 is null, therefore o1 can be null.
*** This bug has been marked as a duplicate of bug 245201 ***