You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/12/09 03:37:01 UTC

svn commit: r888685 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math: genetics/GeneticAlgorithmTestPermutations.java linear/BlockRealMatrixTest.java linear/SparseRealMatrixTest.java

Author: sebb
Date: Wed Dec  9 02:37:00 2009
New Revision: 888685

URL: http://svn.apache.org/viewvc?rev=888685&view=rev
Log:
Unnecessary casts

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestPermutations.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealMatrixTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestPermutations.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestPermutations.java?rev=888685&r1=888684&r2=888685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestPermutations.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestPermutations.java Wed Dec  9 02:37:00 2009
@@ -112,7 +112,7 @@
             int res = 0;
             List<Integer> decoded = decode(sequence);
             for (int i=0; i<decoded.size(); i++) {
-                int value = (Integer) decoded.get(i);
+                int value = decoded.get(i);
                 if (value != i) {
                     // bad position found
                     res += Math.abs(value - i);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java?rev=888685&r1=888684&r2=888685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java Wed Dec  9 02:37:00 2009
@@ -980,8 +980,8 @@
 
     public void testEqualsAndHashCode() {
         BlockRealMatrix m = new BlockRealMatrix(testData);
-        BlockRealMatrix m1 = (BlockRealMatrix) m.copy();
-        BlockRealMatrix mt = (BlockRealMatrix) m.transpose();
+        BlockRealMatrix m1 = m.copy();
+        BlockRealMatrix mt = m.transpose();
         assertTrue(m.hashCode() != mt.hashCode());
         assertEquals(m.hashCode(), m1.hashCode());
         assertEquals(m, m);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealMatrixTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealMatrixTest.java?rev=888685&r1=888684&r2=888685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealMatrixTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealMatrixTest.java Wed Dec  9 02:37:00 2009
@@ -542,7 +542,7 @@
 
     public void testEqualsAndHashCode() {
         OpenMapRealMatrix m = createSparseMatrix(testData);
-        OpenMapRealMatrix m1 = (OpenMapRealMatrix) m.copy();
+        OpenMapRealMatrix m1 = m.copy();
         OpenMapRealMatrix mt = (OpenMapRealMatrix) m.transpose();
         assertTrue(m.hashCode() != mt.hashCode());
         assertEquals(m.hashCode(), m1.hashCode());