cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r644185 - /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
Date Thu, 03 Apr 2008 06:46:00 GMT
Author: joerg
Date: Wed Apr  2 23:45:59 2008
New Revision: 644185

URL: http://svn.apache.org/viewvc?rev=644185&view=rev
Log:
fix synchronization issue

Modified:
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java?rev=644185&r1=644184&r2=644185&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
Wed Apr  2 23:45:59 2008
@@ -16,12 +16,14 @@
  */
 package org.apache.cocoon.components.flow;
 
-import java.text.SimpleDateFormat;
+import java.text.Format;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.lang.time.FastDateFormat;
+
 /**
  * Access to continuation data for monitoring applications
  */
@@ -33,7 +35,7 @@
     private static final String HAS_EXPIRED_YES = "yes";
 
     private WebContinuation wc;
-    private SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
+    private Format formatter = FastDateFormat.getInstance("HH:mm:ss");
     private List _children = new ArrayList();
 
     public WebContinuationDataBean(WebContinuation wc) {
@@ -66,17 +68,14 @@
     }
 
     public String getExpireTime() {
-        return formatter.format(new Date(wc.getLastAccessTime()
-                + wc.getTimeToLive()));
+        return formatter.format(new Date(wc.getLastAccessTime() + wc.getTimeToLive()));
     }
 
     public String hasExpired() {
-        if ((wc.getLastAccessTime() + wc.getTimeToLive()) < System
-                .currentTimeMillis()) {
+        if (wc.hasExpired()) {
             return HAS_EXPIRED_YES;
         }
         return HAS_EXPIRED_NO;
-
     }
 
     public String getType() {



Mime
View raw message