From 17ca771e10b63b66bb78322d9996f19be2ad0c1f Mon Sep 17 00:00:00 2001 From: aherbert Date: Thu, 13 Oct 2022 17:43:00 +0100 Subject: [PATCH] sonarfix: remove unnecessary boolean --- .../apache/commons/math4/legacy/optim/PointValuePair.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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;