ASF Bugzilla – Attachment 34461 Details for
Bug 60392
NPE JDBCSampler when catching Exceptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Guard Exception handler against null messages
0001-Exception-message-can-be-null.patch (text/plain), 1.17 KB, created by
Felix Schumacher
on 2016-11-19 19:33:56 UTC
(
hide
)
Description:
Guard Exception handler against null messages
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2016-11-19 19:33:56 UTC
Size:
1.17 KB
patch
obsolete
>From 7b94e41a54c7b95e8573778c471813bd1f79daad Mon Sep 17 00:00:00 2001 >From: Felix Schumacher <felix.schumacher@debeka.de> >Date: Fri, 18 Nov 2016 12:47:33 +0100 >Subject: [PATCH] Exception-message can be null. > >--- > .../jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java >index e616ef2..8d9bc3e 100644 >--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java >+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java >@@ -96,7 +96,7 @@ public class JDBCSampler extends AbstractJDBCTestElement implements Sampler, Tes > } catch (Exception ex) { > res.setResponseMessage(ex.toString()); > res.setResponseCode("000"); >- res.setResponseData(ex.getMessage().getBytes()); >+ res.setResponseData(ex.getMessage()==null?"NO MESSAGE".getBytes():ex.getMessage().getBytes()); > res.setSuccessful(false); > } finally { > close(conn); >-- >2.10.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60392
: 34461