summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-06-27 14:27:55 -0400
committerEndi Sukma Dewata <edewata@redhat.com>2012-07-02 12:43:57 -0500
commit10502e34a10fb3b672aef1161cc271003c7806ba (patch)
tree4c3c5e8fc8c99759953b52518f78e8ba3100aa17 /base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
parentd2b06ee1f9fcc42be83f04f64559cfa6317bda67 (diff)
downloadpki-10502e34a10fb3b672aef1161cc271003c7806ba.tar.gz
pki-10502e34a10fb3b672aef1161cc271003c7806ba.tar.xz
pki-10502e34a10fb3b672aef1161cc271003c7806ba.zip
Fixes for Guarded_By_Violation issues shown in Coverity
Diffstat (limited to 'base/common/src/com/netscape/cmscore/dbs/KeyRepository.java')
-rw-r--r--base/common/src/com/netscape/cmscore/dbs/KeyRepository.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java b/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
index 0fbff688a..fb3b9b24a 100644
--- a/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
+++ b/base/common/src/com/netscape/cmscore/dbs/KeyRepository.java
@@ -154,8 +154,9 @@ public class KeyRepository extends Repository implements IKeyRepository {
public void setKeyStatusUpdateInterval(IRepository requestRepo, int interval) {
CMS.debug("In setKeyStatusUpdateInterval " + interval);
-
- this.requestRepository = requestRepo;
+ synchronized (this) {
+ this.requestRepository = requestRepo;
+ }
// stop running task
if (mKeyStatusUpdateTask != null) {