findbugs
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sun, 18 Apr 2010 21:46:32 +0000 (21:46 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sun, 18 Apr 2010 21:46:32 +0000 (21:46 +0000)
support/general/src/test/java/org/wamblee/concurrency/ReadWriteLockTest.java
support/general/src/test/java/org/wamblee/general/PairTest.java

index 3dc5c95abee49ca7bcb08fa5964ed7e53edc2055..0cb27433d1f7dcbf7555e9ec195e45f609e00ea0 100644 (file)
@@ -466,7 +466,7 @@ class ReadLocker implements Runnable {
         try {
             Thread.sleep(sleepTime);
         } catch (InterruptedException e) {
-            ReadWriteLockTest.fail("ReadLocker thread was interrupted." +
+            throw new RuntimeException("ReadLocker thread was interrupted." +
                 Thread.currentThread());
         }
 
@@ -499,7 +499,7 @@ class WriteLocker implements Runnable {
         try {
             Thread.sleep(sleepTime);
         } catch (InterruptedException e) {
-            ReadWriteLockTest.fail("WriteLocker thread was interrupted: " +
+            throw new RuntimeException("WriteLocker thread was interrupted: " +
                 Thread.currentThread());
         }
 
index 071a0c8ce9a8124c3d2d49b369fb819b892084b0..9dad703046b089a3913e483bb27cc9b7366364fd 100644 (file)
@@ -23,7 +23,7 @@ import junit.framework.TestCase;
 public class PairTest extends TestCase {
     public void testPair() {
         Pair<Integer, String> pair = new Pair<Integer, String>(10, "hello");
-        assertEquals(new Integer(10), pair.getFirst());
+        assertEquals(Integer.valueOf(10), pair.getFirst());
         assertEquals("hello", pair.getSecond());
 
         Pair<Integer, String> pair2 = new Pair<Integer, String>(pair);