From 815069a9f6491105ffb57360bdf75435a3e6827c Mon Sep 17 00:00:00 2001 From: Mahendra Chavan Date: Tue, 26 Nov 2024 18:34:25 +0530 Subject: [PATCH] Removed volatile for openStatements and added it for requestStarted --- .../com/microsoft/sqlserver/jdbc/SQLServerConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java index cca84ad54..18a27cc95 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java @@ -7598,7 +7598,7 @@ public T unwrap(Class iface) throws SQLException { } /** request started flag */ - private boolean requestStarted = false; + private volatile boolean requestStarted = false; /** original database autocommit mode */ private boolean originalDatabaseAutoCommitMode; @@ -7640,7 +7640,7 @@ public T unwrap(Class iface) throws SQLException { private volatile SQLWarning originalSqlWarnings; /** open statements */ - private volatile List openStatements; + private List openStatements; /** original usesFmtOnly flag */ private boolean originalUseFmtOnly;