From 0947834ac950fb4dd59b719cbdddc1726e68674b Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 11 Jan 2007 23:19:44 +0000 Subject: Fixes for bugs found using FindBugs. --- .../com/amazon/carbonado/repo/sleepycat/BDBRepository.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat') diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java index 6aeb89e..7792536 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java @@ -718,6 +718,7 @@ abstract class BDBRepository } finally { synchronized (this) { mInProgress = false; + // Only wait condition is mInProgress, so okay to not call notifyAll. notify(); } repository = null; @@ -726,6 +727,7 @@ abstract class BDBRepository } finally { synchronized (this) { mInProgress = false; + // Only wait condition is mInProgress, so okay to not call notifyAll. notify(); } } @@ -802,12 +804,10 @@ abstract class BDBRepository public void run() { while (true) { - synchronized (this) { - try { - wait(mSleepInterval); - } catch (InterruptedException e) { - break; - } + try { + Thread.sleep(mSleepInterval); + } catch (InterruptedException e) { + break; } BDBRepository repository = mRepository.get(); -- cgit v1.2.3