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

[BUG] #155

Open
MattWong128 opened this issue Apr 8, 2024 · 0 comments · May be fixed by #158
Open

[BUG] #155

MattWong128 opened this issue Apr 8, 2024 · 0 comments · May be fixed by #158
Labels
bug Something isn't working

Comments

@MattWong128
Copy link

MattWong128 commented Apr 8, 2024

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

@MattWong128 MattWong128 added the bug Something isn't working label Apr 8, 2024
@cafox2003 cafox2003 linked a pull request Apr 17, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant