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.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1669782 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2015-03-28 15:05:04 +00:00
parent 346aae3b32
commit e29f33c366
1 changed files with 1 additions and 1 deletions

View File

@ -882,7 +882,7 @@ public DiffBuilder append(final String fieldName, final Object lhs,
}
// Not array type
if (lhs != null ? lhs.equals(rhs) : rhs.equals(lhs)) {
if (lhs != null && lhs.equals(rhs)) {
return this;
}