[findbugs] equals() must return false for null argument
The contract defined by java.lang.Object.equals() requires that it must return false if passed a null argument. Change-Id: I0b54beeeaed7fbd87d7e3ea5c4d4f5ae3c7d6137 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
@@ -94,6 +94,8 @@ public class AndPredicate<T> extends Predicate<T> {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object other) {
|
||||
if (other == null)
|
||||
return false;
|
||||
return getClass() == other.getClass()
|
||||
&& getChildren().equals(((Predicate<?>) other).getChildren());
|
||||
}
|
||||
|
Reference in New Issue
Block a user