jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1771948 - in /jmeter/trunk: src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java xdocs/changes.xml
Date Tue, 29 Nov 2016 19:46:58 GMT
Author: fschumacher
Date: Tue Nov 29 19:46:58 2016
New Revision: 1771948

URL: http://svn.apache.org/viewvc?rev=1771948&view=rev
Log:
603982 Guard Exception handler of the JDBCSampler against null messages

Modified:
    jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java?rev=1771948&r1=1771947&r2=1771948&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
(original)
+++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Tue Nov 29 19:46:58 2016
@@ -24,6 +24,7 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.jmeter.config.ConfigTestElement;
 import org.apache.jmeter.engine.util.ConfigMergabilityIndicator;
 import org.apache.jmeter.protocol.jdbc.AbstractJDBCTestElement;
@@ -96,7 +97,7 @@ public class JDBCSampler extends Abstrac
         } catch (Exception ex) {
             res.setResponseMessage(ex.toString());
             res.setResponseCode("000");
-            res.setResponseData(ex.getMessage().getBytes());
+            res.setResponseData(ObjectUtils.defaultIfNull(ex.getMessage(), "NO MESSAGE").getBytes());
             res.setSuccessful(false);
         } finally {
             close(conn);

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1771948&r1=1771947&r2=1771948&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Tue Nov 29 19:46:58 2016
@@ -155,6 +155,7 @@ Fill in some detail.
 
 <h3>Other Samplers</h3>
 <ul>
+    <li><bug>603982</bug>Guard Exception handler of the <code>JDBCSampler</code>
against null messages</li>
 </ul>
 
 <h3>Controllers</h3>



Mime
View raw message