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

removes redundant database close that will otherwise happen anyway in … #965

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

holmbergius
Copy link
Contributor

@holmbergius holmbergius commented Dec 28, 2024

…the finaly{} block, even if the return is called.

An exception can be thrown due to a database close in the try{} block and then again in the finally{} block. This removes the redundant database close, trusting the finally{} to handle the close, even with the return; out of the function..

…the finaly{} block, even if the return is called.
@holmbergius holmbergius marked this pull request as ready for review December 30, 2024 18:51
Copy link
Member

@naknomum naknomum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@TanyaStere42
Copy link
Member

@naknomum is there a reason this didn't get merged when it was approved?

@holmbergius holmbergius merged commit 023135f into main Jan 3, 2025
1 check passed
@holmbergius holmbergius deleted the redundant-DB-close-during-indexing branch January 3, 2025 20:05
@naknomum
Copy link
Member

naknomum commented Jan 3, 2025

@naknomum is there a reason this didn't get merged when it was approved?

no - i just got on a small CR spree yesterday and approved some PRs but never merged. my bad.

holmbergius added a commit that referenced this pull request Jan 3, 2025
…xing

removes redundant database close that will otherwise happen anyway in …
holmbergius added a commit that referenced this pull request Jan 8, 2025
…xing

removes redundant database close that will otherwise happen anyway in …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants