Skip to content

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

@ecki

Description

@ecki

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.

Metadata

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