This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch CXF-7594 in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 12af1165ab62d7c688337f9f83284b2c581b9b90 Author: Colm O hEigeartaigh <[email protected]> AuthorDate: Fri Apr 10 12:40:32 2020 +0100 Removing persistence configuration from the TokenStore, where it's not required --- .../org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 2d95ea4..591ae8d 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 @@ -20,11 +20,9 @@ package org.apache.cxf.ws.security.tokenstore; import java.io.Closeable; -import java.io.File; import java.net.URL; import java.util.Collection; import java.util.HashSet; -import java.util.Random; import java.util.Set; import org.apache.cxf.Bus; @@ -68,12 +66,7 @@ public class EHCacheTokenStore implements TokenStore, Closeable, BusLifeCycleLis xmlConfig.newCacheConfigurationBuilderFromTemplate(template, String.class, SecurityToken.class); - // Note, we don't require strong random values here, as the key should already end with the - // hashcode of the endpoint info. - String diskKey = key + "-" + Math.abs(new Random().nextInt()); - cacheManager = CacheManagerBuilder.newCacheManagerBuilder().withCache(key, configurationBuilder) - .with(CacheManagerBuilder.persistence( - new File(System.getProperty("java.io.tmpdir"), diskKey))).build(); + cacheManager = CacheManagerBuilder.newCacheManagerBuilder().withCache(key, configurationBuilder).build(); cacheManager.init(); cache = cacheManager.getCache(key, String.class, SecurityToken.class);
