diff --git a/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java b/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java index fde8fbb97..d5e70445c 100644 --- a/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java +++ b/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java @@ -341,8 +341,6 @@ public class PolynomialFunction implements DifferentiableUnivariateRealFunction, public boolean equals(Object obj) { if (this == obj) return true; - if (obj == null) - return false; if (!(obj instanceof PolynomialFunction)) return false; PolynomialFunction other = (PolynomialFunction) obj; diff --git a/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java b/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java index 43b926aa2..fe7a6ca9e 100644 --- a/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java +++ b/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java @@ -778,9 +778,6 @@ public class OpenMapRealVector extends AbstractRealVector implements SparseRealV if (this == obj) { return true; } - if (obj == null) { - return false; - } if (!(obj instanceof OpenMapRealVector)) { return false; } diff --git a/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java b/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java index 4925dc41c..f9421c496 100644 --- a/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java +++ b/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java @@ -615,10 +615,6 @@ public class SparseFieldVector> implements FieldVector return true; } - if (obj == null) { - return false; - } - if (!(obj instanceof SparseFieldVector)) { return false; } diff --git a/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java b/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java index 308098113..63a495dfa 100644 --- a/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java +++ b/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java @@ -135,8 +135,6 @@ public class VectorialCovariance implements Serializable { public boolean equals(Object obj) { if (this == obj) return true; - if (obj == null) - return false; if (!(obj instanceof VectorialCovariance)) return false; VectorialCovariance other = (VectorialCovariance) obj; diff --git a/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java b/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java index b4b18b19a..025341abe 100644 --- a/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java +++ b/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java @@ -92,8 +92,6 @@ public class VectorialMean implements Serializable { public boolean equals(Object obj) { if (this == obj) return true; - if (obj == null) - return false; if (!(obj instanceof VectorialMean)) return false; VectorialMean other = (VectorialMean) obj;