You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: