diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/PointValuePair.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/PointValuePair.java index ae2a4da2c..87b096339 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/PointValuePair.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/PointValuePair.java @@ -82,10 +82,9 @@ public final class PointValuePair extends Pair { if (o instanceof PointValuePair) { final PointValuePair other = (PointValuePair) o; - return getValue().equals(other.getValue()) ? + return getValue().equals(other.getValue()) && Arrays.equals(getPointRef(), - other.getPointRef()) : - false; + other.getPointRef()); } return false;