commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r922714 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math: analysis/polynomials/ linear/ stat/descriptive/moment/
Date Sun, 14 Mar 2010 01:35:15 GMT
Author: sebb
Date: Sun Mar 14 01:35:14 2010
New Revision: 922714

URL: http://svn.apache.org/viewvc?rev=922714&view=rev
Log:
MATH-336 Unnecessary null checks in equals methods

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java?rev=922714&r1=922713&r2=922714&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunction.java
Sun Mar 14 01:35:14 2010
@@ -341,8 +341,6 @@ public class PolynomialFunction implemen
     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;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java?rev=922714&r1=922713&r2=922714&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java
Sun Mar 14 01:35:14 2010
@@ -778,9 +778,6 @@ public class OpenMapRealVector extends A
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
         if (!(obj instanceof OpenMapRealVector)) {
             return false;
         }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java?rev=922714&r1=922713&r2=922714&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SparseFieldVector.java
Sun Mar 14 01:35:14 2010
@@ -615,10 +615,6 @@ public class SparseFieldVector<T extends
             return true;
         }
 
-        if (obj == null) {
-            return false;
-        }
-
         if (!(obj instanceof SparseFieldVector<?>)) {
             return false;
         }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java?rev=922714&r1=922713&r2=922714&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java
Sun Mar 14 01:35:14 2010
@@ -135,8 +135,6 @@ public class VectorialCovariance impleme
     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;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java?rev=922714&r1=922713&r2=922714&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialMean.java
Sun Mar 14 01:35:14 2010
@@ -92,8 +92,6 @@ public class VectorialMean implements Se
     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;



Mime
View raw message