From 3db26bff365de7d2d4e7fc45ad31b8104c78a0ae Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 25 Mar 2008 05:38:00 +0000 Subject: Fixes for bugs as reported by FindBugs. --- .../java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 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 extends AbstractRepository 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; } } -- cgit v1.2.3