Skip to content

Commit 07ee6fb

Browse files
committed
Added null check
1 parent bb73106 commit 07ee6fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerPreparedStatement.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,8 +2889,9 @@ final void doExecutePreparedStatementBatch(PrepStmtBatchExecCmd batchCommand) th
28892889
if (null == batchCommand.batchException)
28902890
batchCommand.batchException = e;
28912891

2892-
if (batchCommand.batchException.getSQLState()
2893-
.equals(SQLState.STATEMENT_CANCELED.getSQLStateCode())) {
2892+
String sqlState = batchCommand.batchException.getSQLState();
2893+
if (null != sqlState
2894+
&& sqlState.equals(SQLState.STATEMENT_CANCELED.getSQLStateCode())) {
28942895
processBatch();
28952896
continue;
28962897
}

0 commit comments

Comments
 (0)