commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r790372 - in /commons/proper/math/trunk/src/test/org/apache/commons/math: genetics/RandomKeyTest.java linear/BigMatrixImplTest.java
Date Wed, 01 Jul 2009 20:48:20 GMT
Author: luc
Date: Wed Jul  1 20:48:19 2009
New Revision: 790372

URL: http://svn.apache.org/viewvc?rev=790372&view=rev
Log:
fixed another set of warnings identified by recent findbugs versions

Modified:
    commons/proper/math/trunk/src/test/org/apache/commons/math/genetics/RandomKeyTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/genetics/RandomKeyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/genetics/RandomKeyTest.java?rev=790372&r1=790371&r2=790372&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/genetics/RandomKeyTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/genetics/RandomKeyTest.java
Wed Jul  1 20:48:19 2009
@@ -66,8 +66,8 @@
     public void testRandomPermutation() {
         // never generate an invalid one
         for (int i=0; i<10; i++) {
-            @SuppressWarnings("unused")
             DummyRandomKey drk = new DummyRandomKey(RandomKey.randomPermutation(20));
+            assertNotNull(drk);
         }
     }
 

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java?rev=790372&r1=790371&r2=790372&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
Wed Jul  1 20:48:19 2009
@@ -392,8 +392,8 @@
         assertEquals("nonsingular  R test 2",-1d,m.getDeterminant().doubleValue(),normTolerance);
 
         try {
-            new BigMatrixImpl(testData2).getDeterminant().doubleValue();
-            fail("Expecting InvalidMatrixException");
+            double d = new BigMatrixImpl(testData2).getDeterminant().doubleValue();
+            fail("Expecting InvalidMatrixException, got " + d);
         } catch (InvalidMatrixException ex) {
             // ignored
         }      
@@ -405,8 +405,8 @@
         assertEquals("identity trace",3d,m.getTrace().doubleValue(),entryTolerance);
         m = new BigMatrixImpl(testData2);
         try {
-            m.getTrace().doubleValue();
-            fail("Expecting NonSquareMatrixException");
+            double t = m.getTrace().doubleValue();
+            fail("Expecting NonSquareMatrixException, got " + t);
         } catch (NonSquareMatrixException ex) {
             // ignored
         }      



Mime
View raw message