diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-01-11 23:19:44 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-01-11 23:19:44 +0000 |
commit | 0947834ac950fb4dd59b719cbdddc1726e68674b (patch) | |
tree | dbd0be38df31a000ee178a60dac3557de0f1ad58 /src/main/java/com/amazon/carbonado/repo/sleepycat | |
parent | 1ce80a9798cc52b12074fcdf1acf32b0fdfe0569 (diff) |
Fixes for bugs found using FindBugs.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java | 12 |
1 files changed, 6 insertions, 6 deletions
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<Txn> } 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<Txn> } finally {
synchronized (this) {
mInProgress = false;
+ // Only wait condition is mInProgress, so okay to not call notifyAll.
notify();
}
}
@@ -802,12 +804,10 @@ abstract class BDBRepository<Txn> 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();
|