Question
The statement of the validation query is not closed when an exception happen. The close should be moved to a finally block I guess.
https://github.com/Microsoft/mssql-jdbc/blob/dev/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java#L5584
The comment below suggest you would have to catch exceptions and to set valid=false. This complicates the code but looks like the right thing to do.
Question
The statement of the validation query is not closed when an exception happen. The close should be moved to a finally block I guess.
https://github.com/Microsoft/mssql-jdbc/blob/dev/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java#L5584
The comment below suggest you would have to catch exceptions and to set valid=false. This complicates the code but looks like the right thing to do.