From 69589814129bf396e2a0a2ff1716425f1fbf4d03 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sun, 18 Apr 2010 21:46:32 +0000 Subject: [PATCH] findbugs --- .../test/java/org/wamblee/concurrency/ReadWriteLockTest.java | 4 ++-- .../general/src/test/java/org/wamblee/general/PairTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.31.1