Author: rfrovarp
Date: Fri Aug 31 14:30:37 2007
New Revision: 571596
URL: http://svn.apache.org/viewvc?rev=571596&view=rev
Log:
Date objects are mutable, so store copy. Fixed up variables so they are all in one place.
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java
lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/VersionImpl.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java?rev=571596&r1=571595&r2=571596&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java Fri Aug 31 14:30:37 2007
@@ -31,8 +31,11 @@
*/
public class LenyaVersion implements Version {
+ private Date date;
private String event;
+ private String ipAddress;
private String state;
+ private String userId;
private Map variableValues = new HashMap();
/**
@@ -49,10 +52,6 @@
return this.state;
}
- private Date date;
- private String userId;
- private String ipAddress;
-
/**
* Returns the date.
* @return A string.
@@ -66,7 +65,7 @@
* @param _date A date.
*/
public void setDate(Date _date) {
- this.date = _date;
+ this.date = _date.clone();
}
/**
Modified: lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/VersionImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/VersionImpl.java?rev=571596&r1=571595&r2=571596&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/VersionImpl.java (original)
+++ lenya/trunk/src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/VersionImpl.java Fri Aug 31 14:30:37 2007
@@ -31,10 +31,13 @@
*/
public class VersionImpl implements Version {
+ private Date date;
+ private String ipAddress;
private String event;
private String state;
+ private String userId;
private Map variableValues = new HashMap();
-
+
/**
* @see org.apache.lenya.workflow.Version#getEvent()
*/
@@ -49,10 +52,6 @@
return this.state;
}
- private Date date;
- private String userId;
- private String ipAddress;
-
/**
* Returns the date.
* @return A string.
@@ -66,7 +65,7 @@
* @param _date A date.
*/
public void setDate(Date _date) {
- this.date = _date;
+ this.date = _date.clone();
}
/**
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.