File: ehcache.patch

package info (click to toggle)
openid4java 0.9.6.662-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,988 kB
  • ctags: 2,057
  • sloc: java: 14,299; xml: 2,988; jsp: 865; makefile: 20; sh: 14
file content (28 lines) | stat: -rw-r--r-- 1,887 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: changes the calls Cache.getTimeToIdleSeconds() to
  Cache.getCacheConfiguration().getTimeToIdleSeconds() and
  Cache.getTimeToLiveSeconds() to
  Cache.getCacheConfiguration().getTimeToLiveSeconds()
Author: 2010, Olivier Weinstoerffer <olivier.weinstoerffer@gmail.com>
Index: openid4java-0.9.5.593/src/org/openid4java/consumer/EhcacheNonceVerifier.java
===================================================================
--- openid4java-0.9.5.593.orig/src/org/openid4java/consumer/EhcacheNonceVerifier.java	2010-12-20 23:39:03.000000000 +0000
+++ openid4java-0.9.5.593/src/org/openid4java/consumer/EhcacheNonceVerifier.java	2010-12-20 23:39:46.000000000 +0000
@@ -29,14 +29,14 @@
 
     public void setCache(Cache cache)
     {
-        if (cache.getTimeToLiveSeconds() != _maxAgeSeconds)
+        if (cache.getCacheConfiguration().getTimeToLiveSeconds() != _maxAgeSeconds)
         {
-            throw new IllegalArgumentException("Max Age: " + _maxAgeSeconds + ", same expected for cache, but found: " + cache.getTimeToLiveSeconds());
+            throw new IllegalArgumentException("Max Age: " + _maxAgeSeconds + ", same expected for cache, but found: " + cache.getCacheConfiguration().getTimeToLiveSeconds());
         }
 
-        if (cache.getTimeToLiveSeconds() != cache.getTimeToIdleSeconds())
+        if (cache.getCacheConfiguration().getTimeToLiveSeconds() != cache.getCacheConfiguration().getTimeToIdleSeconds())
         {
-            throw new IllegalArgumentException("Cache must have same timeToLive (" + cache.getTimeToLiveSeconds() + ") as timeToIdle (" + cache.getTimeToIdleSeconds() + ")");
+            throw new IllegalArgumentException("Cache must have same timeToLive (" + cache.getCacheConfiguration().getTimeToLiveSeconds() + ") as timeToIdle (" + cache.getCacheConfiguration().getTimeToIdleSeconds() + ")");
         }
 
         _cache = cache;