cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1341852 - /cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
Date Wed, 23 May 2012 13:14:47 GMT
Author: coheigea
Date: Wed May 23 13:14:46 2012
New Revision: 1341852

URL: http://svn.apache.org/viewvc?rev=1341852&view=rev
Log:
Switch to using Date instead of Calendar

Modified:
    cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java

Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java?rev=1341852&r1=1341851&r2=1341852&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
(original)
+++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/FederationProcessorImpl.java
Wed May 23 13:14:46 2012
@@ -25,7 +25,6 @@ import java.net.URL;
 import java.net.URLEncoder;
 import java.text.DateFormat;
 import java.text.ParseException;
-import java.util.Calendar;
 import java.util.Date;
 
 import javax.servlet.http.HttpServletRequest;
@@ -145,12 +144,12 @@ public class FederationProcessorImpl imp
         }
 
         if (config.isDetectExpiredTokens() && lifeTime != null) {
-            Calendar cal = Calendar.getInstance();
-            if (cal.getTime().after(lifeTime.getExpires())) {
+            Date currentDate = new Date();
+            if (currentDate.after(lifeTime.getExpires())) {
                 LOG.warn("Token already expired");
             }
 
-            if (cal.getTime().before(lifeTime.getCreated())) {
+            if (currentDate.before(lifeTime.getCreated())) {
                 LOG.warn("Token not yet valid");
                 // [TODO] Add Check clocksqew
             }



Mime
View raw message