MATH-336 Unnecessary null checks in equals methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@922714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-03-14 01:35:14 +00:00
parent 88e4b16f64
commit 012a6ed4fc
5 changed files with 0 additions and 13 deletions

View File

@ -341,8 +341,6 @@ public class PolynomialFunction implements DifferentiableUnivariateRealFunction,
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
if (obj == null)
return false;
if (!(obj instanceof PolynomialFunction)) if (!(obj instanceof PolynomialFunction))
return false; return false;
PolynomialFunction other = (PolynomialFunction) obj; PolynomialFunction other = (PolynomialFunction) obj;

View File

@ -778,9 +778,6 @@ public class OpenMapRealVector extends AbstractRealVector implements SparseRealV
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (obj == null) {
return false;
}
if (!(obj instanceof OpenMapRealVector)) { if (!(obj instanceof OpenMapRealVector)) {
return false; return false;
} }

View File

@ -615,10 +615,6 @@ public class SparseFieldVector<T extends FieldElement<T>> implements FieldVector
return true; return true;
} }
if (obj == null) {
return false;
}
if (!(obj instanceof SparseFieldVector<?>)) { if (!(obj instanceof SparseFieldVector<?>)) {
return false; return false;
} }

View File

@ -135,8 +135,6 @@ public class VectorialCovariance implements Serializable {
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
if (obj == null)
return false;
if (!(obj instanceof VectorialCovariance)) if (!(obj instanceof VectorialCovariance))
return false; return false;
VectorialCovariance other = (VectorialCovariance) obj; VectorialCovariance other = (VectorialCovariance) obj;

View File

@ -92,8 +92,6 @@ public class VectorialMean implements Serializable {
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
if (obj == null)
return false;
if (!(obj instanceof VectorialMean)) if (!(obj instanceof VectorialMean))
return false; return false;
VectorialMean other = (VectorialMean) obj; VectorialMean other = (VectorialMean) obj;