mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-08 02:58:33 +00:00
Use Objects.equals()
This commit is contained in:
parent
308896c651
commit
53bb929c8f
@ -114,7 +114,7 @@ public DiffBuilder(final T lhs, final T rhs,
|
|||||||
this.style = style;
|
this.style = style;
|
||||||
|
|
||||||
// Don't compare any fields if objects equal
|
// Don't compare any fields if objects equal
|
||||||
this.objectsTriviallyEqual = testTriviallyEqual && (lhs == rhs || lhs.equals(rhs));
|
this.objectsTriviallyEqual = testTriviallyEqual && Objects.equals(lhs, rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -814,7 +814,7 @@ public DiffBuilder<T> append(final String fieldName, final Object lhs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Not array type
|
// Not array type
|
||||||
if (lhs != null && lhs.equals(rhs)) {
|
if (Objects.equals(lhs, rhs)) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user