summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/sleepycat
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-03-25 05:38:00 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-03-25 05:38:00 +0000
commit3db26bff365de7d2d4e7fc45ad31b8104c78a0ae (patch)
treea32ea36c3e356311559d984a4d61524193869f55 /src/main/java/com/amazon/carbonado/repo/sleepycat
parent5ad29e976d528214c6e26065f2fb39126a5ae10a (diff)
Fixes for bugs as reported by FindBugs.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java8
1 files changed, 6 insertions, 2 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 4bf4e2b..f12a58e 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
@@ -553,8 +553,12 @@ abstract class BDBRepository<Txn> extends AbstractRepository<Txn>
break;
}
- if (mSuspendUntil != Long.MIN_VALUE) {
- if (System.currentTimeMillis() < mSuspendUntil) {
+ long suspendUntil;
+ synchronized (this) {
+ suspendUntil = mSuspendUntil;
+ }
+ if (suspendUntil != Long.MIN_VALUE) {
+ if (System.currentTimeMillis() < suspendUntil) {
continue;
}
}