[activemq-artemis] branch master updated: ARTEMIS-2924 prevent NPE

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[activemq-artemis] branch master updated: ARTEMIS-2924 prevent NPE

brusdev-2
This is an automated email from the ASF dual-hosted git repository.

brusdev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new aaba435  ARTEMIS-2924 prevent NPE
     new ecdcdd0  This closes #3283
aaba435 is described below

commit aaba435cae8980d86675e4548ba971db862bf166
Author: Justin Bertram <[hidden email]>
AuthorDate: Wed Sep 30 09:56:55 2020 -0500

    ARTEMIS-2924 prevent NPE
---
 .../activemq/artemis/jdbc/store/logging/LoggingResultSet.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/logging/LoggingResultSet.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/logging/LoggingResultSet.java
index 476c5bc..05dcac4 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/logging/LoggingResultSet.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/logging/LoggingResultSet.java
@@ -824,14 +824,14 @@ public class LoggingResultSet implements ResultSet {
    @Override
    public Blob getBlob(int columnIndex) throws SQLException {
       Blob x = resultSet.getBlob(columnIndex);
-      logger.logf(level, "%s.getBlob(%s) = %s (length: %d)", resultSetID, columnIndex, x, x.length());
+      logger.logf(level, "%s.getBlob(%s) = %s (length: %d)", resultSetID, columnIndex, x, x == null ? null : x.length());
       return x;
    }
 
    @Override
    public Clob getClob(int columnIndex) throws SQLException {
       Clob x = resultSet.getClob(columnIndex);
-      logger.logf(level, "%s.getClob(%s) = %s (length: %d)", resultSetID, columnIndex, x, x.length());
+      logger.logf(level, "%s.getClob(%s) = %s (length: %d)", resultSetID, columnIndex, x, x == null ? null : x.length());
       return x;
    }
 
@@ -859,14 +859,14 @@ public class LoggingResultSet implements ResultSet {
    @Override
    public Blob getBlob(String columnLabel) throws SQLException {
       Blob x = resultSet.getBlob(columnLabel);
-      logger.logf(level, "%s.getBlob(%s) = %s (length: %d)", resultSetID, columnLabel, x, x.length());
+      logger.logf(level, "%s.getBlob(%s) = %s (length: %d)", resultSetID, columnLabel, x, x == null ? null : x.length());
       return x;
    }
 
    @Override
    public Clob getClob(String columnLabel) throws SQLException {
       Clob x = resultSet.getClob(columnLabel);
-      logger.logf(level, "%s.getClob(%s) = %s (length: %d)", resultSetID, columnLabel, x, x.length());
+      logger.logf(level, "%s.getClob(%s) = %s (length: %d)", resultSetID, columnLabel, x, x == null ? null : x.length());
       return x;
    }