Skip to content

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

Closed

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    QuestionUsed when a question is asked, as opposed to an issue being raised

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions