Skip to content

Commit e4e783a

Browse files
authored
Added null check (#2032)
1 parent 1290f9c commit e4e783a

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
@@ -2972,8 +2972,9 @@ final void doExecutePreparedStatementBatch(PrepStmtBatchExecCmd batchCommand) th
29722972
if (null == batchCommand.batchException)
29732973
batchCommand.batchException = e;
29742974

2975-
if (batchCommand.batchException.getSQLState()
2976-
.equals(SQLState.STATEMENT_CANCELED.getSQLStateCode())) {
2975+
String sqlState = batchCommand.batchException.getSQLState();
2976+
if (null != sqlState
2977+
&& sqlState.equals(SQLState.STATEMENT_CANCELED.getSQLStateCode())) {
29772978
processBatch();
29782979
continue;
29792980
}

0 commit comments

Comments
 (0)