Author: pmouawad
Date: Mon Feb 29 12:16:39 2016
New Revision: 1732882

URL: http://svn.apache.org/viewvc?rev=1732882&view=rev
Log:
Bug 59075 - JMS Publisher: NumberFormatException is thrown is priority or 
expiration fields are empty
Bugzilla Id: 59075

Modified:
    
jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
    jmeter/trunk/xdocs/changes.xml

Modified: 
jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java?rev=1732882&r1=1732881&r2=1732882&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
 (original)
+++ 
jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
 Mon Feb 29 12:16:39 2016
@@ -516,11 +516,21 @@ public class PublisherSampler extends Ba
     }
 
     public String getExpiration() {
-        return getPropertyAsString(JMS_EXPIRATION, Utils.DEFAULT_NO_EXPIRY);
+        String expiration = getPropertyAsString(JMS_EXPIRATION);
+        if (expiration.length() == 0) {
+            return Utils.DEFAULT_NO_EXPIRY;
+        } else {
+            return expiration;
+        }
     }
 
     public String getPriority() {
-        return getPropertyAsString(JMS_PRIORITY, Utils.DEFAULT_PRIORITY_4);
+        String priority = getPropertyAsString(JMS_PRIORITY);
+        if (priority.length() == 0) {
+            return Utils.DEFAULT_PRIORITY_4;
+        } else {
+            return priority;
+        }
     }
     
     public void setPriority(String s) {

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1732882&r1=1732881&r2=1732882&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Mon Feb 29 12:16:39 2016
@@ -294,6 +294,7 @@ Summary
     <li><bug>58947</bug>Connect metric is wrong when ConnectException 
occurs</li>
     <li><bug>58980</bug>JMS Subscriber will return successful as long as 1 
message is received. Contributed by Harrison Termotto (harrison dot termotto at 
stonybrook.edu)</li>
     <li><bug>59051</bug>JDBC Request : Connection is closed by pool if it 
exceeds the configured lifetime (affects nightly build as of 23 fev 2016).</li>
+    <li><bug>59075</bug>JMS Publisher: NumberFormatException is thrown is 
priority or expiration fields are empty</li>
 </ul>
 
 <h3>Controllers</h3>


Reply via email to