You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/04/16 14:15:18 UTC
[cxf] branch master updated: Making cache close methods synchronized
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 9387c3f Making cache close methods synchronized
9387c3f is described below
commit 9387c3f65862bbe9356457ad4c111eda852fcc90
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Apr 16 15:14:52 2020 +0100
Making cache close methods synchronized
---
.../org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java | 2 +-
.../apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java | 2 +-
.../java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java | 2 +-
.../src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java | 2 +-
.../src/main/java/org/apache/cxf/xkms/cache/EHCacheXKMSClientCache.java | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
index 58b96ee..9f6b77c 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
@@ -147,7 +147,7 @@ public class EHCacheTokenReplayCache implements TokenReplayCache<String> {
return element != null;
}
- public void close() {
+ public synchronized void close() {
if (cacheManager.getStatus() == Status.AVAILABLE) {
cacheManager.removeCache(CACHE_KEY);
cacheManager.close();
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
index f79dad3..b961f09 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
@@ -161,7 +161,7 @@ public class EHCacheSPStateManager implements SPStateManager {
return state;
}
- public void close() throws IOException {
+ public synchronized void close() throws IOException {
if (requestCacheManager.getStatus() == Status.AVAILABLE) {
requestCacheManager.removeCache(REQUEST_CACHE_KEY);
requestCacheManager.close();
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
index 591ae8d..66d77bd 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
@@ -116,7 +116,7 @@ public class EHCacheTokenStore implements TokenStore, Closeable, BusLifeCycleLis
return cache.get(identifier);
}
- public void close() {
+ public synchronized void close() {
if (cacheManager.getStatus() == Status.AVAILABLE) {
cacheManager.removeCache(key);
cacheManager.close();
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
index 005a01c..115256e 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/cache/EHCacheIdentityCache.java
@@ -118,7 +118,7 @@ public class EHCacheIdentityCache extends AbstractIdentityCache
return this.cache.toString();
}
- public void close() {
+ public synchronized void close() {
if (cacheManager.getStatus() == Status.AVAILABLE) {
cacheManager.removeCache(KEY);
cacheManager.close();
diff --git a/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/cache/EHCacheXKMSClientCache.java b/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/cache/EHCacheXKMSClientCache.java
index 396ca29..52c2a99 100644
--- a/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/cache/EHCacheXKMSClientCache.java
+++ b/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/cache/EHCacheXKMSClientCache.java
@@ -117,7 +117,7 @@ public class EHCacheXKMSClientCache implements XKMSClientCache, BusLifeCycleList
return cache.get(key);
}
- public void close() {
+ public synchronized void close() {
if (cacheManager.getStatus() == Status.AVAILABLE) {
cacheManager.removeCache(cacheKey);
cacheManager.close();