Repository: cxf Updated Branches: refs/heads/master ec4d58227 -> 2a614f6ed
Fix PMD issue Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2a614f6e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2a614f6e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2a614f6e Branch: refs/heads/master Commit: 2a614f6ed7fe03fe6b5776fea3868dd875e74f71 Parents: ec4d582 Author: Daniel Kulp <[email protected]> Authored: Mon Jun 30 13:16:35 2014 -0400 Committer: Daniel Kulp <[email protected]> Committed: Mon Jun 30 13:16:35 2014 -0400 ---------------------------------------------------------------------- .../apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/2a614f6e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java ---------------------------------------------------------------------- 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 59f9e7a..c5855a6 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 @@ -153,10 +153,9 @@ public class EHCacheTokenStore implements TokenStore, Closeable, BusLifeCycleLis // this step is especially important for global shared cache manager if (cache != null) { synchronized (cache) { - if (cache instanceof RefCountCache) { - if (((RefCountCache)cache).decrementAndGet() == 0) { - cacheManager.removeCache(cache.getName()); - } + if (cache instanceof RefCountCache + && ((RefCountCache)cache).decrementAndGet() == 0) { + cacheManager.removeCache(cache.getName()); } } }
