cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1510991 - in /cxf/trunk/rt: rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/ rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/ ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/
Date Tue, 06 Aug 2013 15:14:35 GMT
Author: dkulp
Date: Tue Aug  6 15:14:35 2013
New Revision: 1510991

URL: http://svn.apache.org/r1510991
Log:
Fix all the eclipse warnings

Modified:
    cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
    cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java

Modified: cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java?rev=1510991&r1=1510990&r2=1510991&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
(original)
+++ cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/EHCacheTokenReplayCache.java
Tue Aug  6 15:14:35 2013
@@ -145,8 +145,10 @@ public class EHCacheTokenReplayCache imp
                 parsedTTL = 3600;
             }
         }
-        
-        cache.put(new Element(id, id, false, parsedTTL, parsedTTL));
+        Element element = new Element(id, id);
+        element.setTimeToLive(parsedTTL);
+        element.setTimeToIdle(parsedTTL);
+        cache.put(element);
     }
     
     /**

Modified: cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java?rev=1510991&r1=1510990&r2=1510991&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
(original)
+++ cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/state/EHCacheSPStateManager.java
Tue Aug  6 15:14:35 2013
@@ -156,8 +156,11 @@ public class EHCacheSPStateManager imple
             // Fall back to 5 minutes if the default TTL is set incorrectly
             parsedTTL = 60 * 5;
         }
+        Element element = new Element(securityContextKey, state);
+        element.setTimeToLive(parsedTTL);
+        element.setTimeToIdle(parsedTTL);
         
-        responseCache.put(new Element(securityContextKey, state, false, parsedTTL, parsedTTL));
+        responseCache.put(element);
     }
     
     public void setRequestState(String relayState, RequestState state) {
@@ -171,7 +174,10 @@ public class EHCacheSPStateManager imple
             parsedTTL = 3600;
         }
         
-        requestCache.put(new Element(relayState, state, false, parsedTTL, parsedTTL));
+        Element element = new Element(relayState, state);
+        element.setTimeToLive(parsedTTL);
+        element.setTimeToIdle(parsedTTL);
+        requestCache.put(element);
     }
 
     public RequestState removeRequestState(String relayState) {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java?rev=1510991&r1=1510990&r2=1510991&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java
Tue Aug  6 15:14:35 2013
@@ -61,8 +61,9 @@ public class EHCacheTokenStore implement
 
         cacheManager = EHCacheManagerHolder.getCacheManager(configFileURL);
         // Cannot overflow to disk as SecurityToken Elements can't be serialized
-        CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
-        cc.overflowToDisk(false); //tokens not writable
+        @SuppressWarnings("deprecation")
+        CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager)
+            .overflowToDisk(false); //tokens not writable
         
         Ehcache newCache = new Cache(cc);
         cache = cacheManager.addCacheIfAbsent(newCache);
@@ -91,7 +92,10 @@ public class EHCacheTokenStore implement
         if (token != null && !StringUtils.isEmpty(token.getId())) {
             int parsedTTL = getTTL(token);
             if (parsedTTL > 0) {
-                cache.put(new Element(token.getId(), token, false, parsedTTL, parsedTTL));
+                Element element = new Element(token.getId(), token);
+                element.setTimeToLive(parsedTTL);
+                element.setTimeToIdle(parsedTTL);
+                cache.put(element);
             }
         }
     }
@@ -100,7 +104,10 @@ public class EHCacheTokenStore implement
         if (token != null && !StringUtils.isEmpty(identifier)) {
             int parsedTTL = getTTL(token);
             if (parsedTTL > 0) {
-                cache.put(new Element(identifier, token, false, parsedTTL, parsedTTL));
+                Element element = new Element(identifier, token);
+                element.setTimeToLive(parsedTTL);
+                element.setTimeToIdle(parsedTTL);
+                cache.put(element);
             }
         }
     }



Mime
View raw message