ARTEMIS-2924 prevent NPE

This commit is contained in:
Justin Bertram 2020-09-30 09:56:55 -05:00 committed by Domenico Francesco Bruscino
parent e0c8859367
commit aaba435cae
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}