jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1197316 - /jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
Date Thu, 03 Nov 2011 21:26:16 GMT
Author: pmouawad
Date: Thu Nov  3 21:26:16 2011
New Revision: 1197316

URL: http://svn.apache.org/viewvc?rev=1197316&view=rev
Log:
Bug 52052 - Using a delimiter to separate result-messages for JMS Subscriber
Fix setting \t, \n , \r as separator

Modified:
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java?rev=1197316&r1=1197315&r2=1197316&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
Thu Nov  3 21:26:16 2011
@@ -93,6 +93,8 @@ public class SubscriberSampler extends B
     
     private transient boolean START_ON_SAMPLE = false;
 
+	private volatile String separator;
+
     public SubscriberSampler() {
         super();
     }
@@ -248,7 +250,7 @@ public class SubscriberSampler extends B
                     }
                 }
                 Utils.messageProperties(propBuffer, msg);
-                propBuffer.append(getSeparator());
+                propBuffer.append(separator);
             } catch (JMSException e) {
                 log.error(e.getMessage());
             }
@@ -455,7 +457,10 @@ public class SubscriberSampler extends B
      * {@inheritDoc}
      */
     public void testStarted() {
-        //NOOP
+    	separator = getSeparator();
+    	separator = separator.replace("\\t", "\t");
+    	separator = separator.replace("\\n", "\n");
+    	separator = separator.replace("\\r", "\r");
     }
 
     /**



Mime
View raw message