Author: sebb
Date: Sat May 19 06:08:59 2007
New Revision: 539748

URL: http://svn.apache.org/viewvc?view=rev&rev=539748
Log:
Allow setup of formatter by OldSaveService (CSV)

Modified:
    
jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java

Modified: 
jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java?view=diff&rev=539748&r1=539747&r2=539748
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
 Sat May 19 06:08:59 2007
@@ -23,6 +23,7 @@
 
 import java.io.ObjectStreamException;
 import java.io.Serializable;
+import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Properties;
 
@@ -219,7 +220,7 @@
        private boolean printMilliseconds = _printMilliseconds;
 
        /** A formatter for the time stamp. */
-       private transient SimpleDateFormat formatter = _formatter;
+       private transient DateFormat formatter = _formatter;
     /* Make transient as we don't want to save the SimpleDataFormat class
      * Also, there's currently no way to change the value via the GUI, so 
changing it
      * later means editting the JMX, or recreating the Listener.
@@ -255,7 +256,7 @@
 
     private static final boolean _threadCounts;
     
-       private static final SimpleDateFormat _formatter;
+       private static final DateFormat _formatter;
 
        /**
         * The string used to separate fields when stored to disk, for example, 
the
@@ -388,9 +389,6 @@
                xml = value;
        }
 
-// TODO: may need to implement this to allow for adding new attributes to the 
config,
-// otherwise XStream will not populate the missing attributes
- 
     private Object readResolve() throws ObjectStreamException{
           formatter = _formatter;
        return this;
@@ -691,11 +689,19 @@
 
        ///////////////// End of standard field accessors /////////////////////
        
+    /**
+     * Only intended for use by OldSaveService
+     */
+    public void setFormatter(DateFormat fmt){
+       printMilliseconds = false;
+       formatter = fmt;
+    }
+    
        public boolean printMilliseconds() {
                return printMilliseconds;
        }
 
-       public SimpleDateFormat formatter() {
+       public DateFormat formatter() {
                return formatter;
        }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to