You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2015/03/28 16:05:04 UTC
svn commit: r1669782 -
/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
Author: britter
Date: Sat Mar 28 15:05:04 2015
New Revision: 1669782
URL: http://svn.apache.org/r1669782
Log:
FindBugs: Load of known null value.
At this point if lhs is null, rhs will can not be null.
So evaluating the line with lhs == null will result in
rhs.equals(null) which should always be false.
Modified:
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java?rev=1669782&r1=1669781&r2=1669782&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java Sat Mar 28 15:05:04 2015
@@ -882,7 +882,7 @@ public class DiffBuilder implements Buil
}
// Not array type
- if (lhs != null ? lhs.equals(rhs) : rhs.equals(lhs)) {
+ if (lhs != null && lhs.equals(rhs)) {
return this;
}