From: Erik Brakkee Date: Sun, 18 Apr 2010 21:46:32 +0000 (+0000) Subject: findbugs X-Git-Tag: wamblee-utils-0.7~539 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=69589814129bf396e2a0a2ff1716425f1fbf4d03;p=utils findbugs --- diff --git a/support/general/src/test/java/org/wamblee/concurrency/ReadWriteLockTest.java b/support/general/src/test/java/org/wamblee/concurrency/ReadWriteLockTest.java index 3dc5c95a..0cb27433 100644 --- a/support/general/src/test/java/org/wamblee/concurrency/ReadWriteLockTest.java +++ b/support/general/src/test/java/org/wamblee/concurrency/ReadWriteLockTest.java @@ -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()); } diff --git a/support/general/src/test/java/org/wamblee/general/PairTest.java b/support/general/src/test/java/org/wamblee/general/PairTest.java index 071a0c8c..9dad7030 100644 --- a/support/general/src/test/java/org/wamblee/general/PairTest.java +++ b/support/general/src/test/java/org/wamblee/general/PairTest.java @@ -23,7 +23,7 @@ import junit.framework.TestCase; public class PairTest extends TestCase { public void testPair() { Pair pair = new Pair(10, "hello"); - assertEquals(new Integer(10), pair.getFirst()); + assertEquals(Integer.valueOf(10), pair.getFirst()); assertEquals("hello", pair.getSecond()); Pair pair2 = new Pair(pair);