REDUN.EQNULLA redundant operation is one that does not have any effect, such as
Even if this is not an error on its own, it may indicate a larger error in the code. A REDUN.EQNULL warning is reported for a suspicious call to equals() with null passed as a parameter. Normally, equals(null) returns false (object is never equal to null). Example 19 public int test() { 10 String s = "String"; 11 if (s.equals(null)) { 12 return 1; 13 } 14 return 0; 15 } REDUN.EQNULL is reported for line 11: Suspicious equals() called with 's' and null (never true). Security guidelines |