Unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@888685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-12-09 02:37:00 +00:00
parent b910285857
commit a97a14915d
3 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,7 @@ public class GeneticAlgorithmTestPermutations {
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);

View File

@ -980,8 +980,8 @@ public final class BlockRealMatrixTest extends TestCase {
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);

View File

@ -542,7 +542,7 @@ public final class SparseRealMatrixTest extends TestCase {
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());