Author: rfrovarp
Date: Mon Aug 13 14:51:14 2007
New Revision: 565548
URL: http://svn.apache.org/viewvc?view=rev&rev=565548
Log:
DateFormat is NOT thread safe. To be so it must be externally synchronized. I don't see any benefit, so I've just removed the static.
Modified:
lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java
Modified: lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java?view=diff&rev=565548&r1=565547&r2=565548
==============================================================================
--- lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java (original)
+++ lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java Mon Aug 13 14:51:14 2007
@@ -64,7 +64,7 @@
*/
public static final String LAST_DATE_PREFIX = "lastDate.";
- protected static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ protected final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
static final String[] PARAMETER_NAMES = { STATE };
@@ -121,7 +121,7 @@
String event = name.substring(LAST_DATE_PREFIX.length());
Version latestEventVersion = getLatestVersion(workflowable, event);
if (latestEventVersion != null) {
- value = DATE_FORMAT.format(latestEventVersion.getDate());
+ value = this.DATE_FORMAT.format(latestEventVersion.getDate());
}
} else {
throw new ConfigurationException("The attribute [" + name
@@ -174,4 +174,4 @@
return objects;
}
-}
\ No newline at end of file
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.