Skip to content

[BUG] #155

@MattWong128

Description

@MattWong128

Description

When a databsae conncetion is made, the connection is not closed after its use. Further, that close call must be made in a finally block otherwise an exception could keep the call from being made.

Expected behavior

A final clause after the try-catch to close the database connection

Actual behavior

No final clause to close the database conneciton

Possible fix

Add a final clause to close the connection

Steps to reproduce

Selecting a book which calls the getBookById() method call that then creates a database connection

Context

Exception was thrown when querying book.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions