Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] should validate put close infinally block? #954

Closed
ecki opened this issue Feb 8, 2019 · 1 comment
Closed

[QUESTION] should validate put close infinally block? #954

ecki opened this issue Feb 8, 2019 · 1 comment
Labels
Question Used when a question is asked, as opposed to an issue being raised

Comments

@ecki
Copy link
Contributor

ecki commented Feb 8, 2019

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.

@ecki ecki added the Question Used when a question is asked, as opposed to an issue being raised label Feb 8, 2019
@cheenamalhotra
Copy link
Member

@ecki
Thanks for catching it, PR #955 should address this concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Used when a question is asked, as opposed to an issue being raised
Projects
None yet
Development

No branches or pull requests

2 participants