Skip to content

Prefer try with resources#228

Merged
elharo merged 1 commit intomasterfrom
close
Dec 9, 2024
Merged

Prefer try with resources#228
elharo merged 1 commit intomasterfrom
close

Conversation

@elharo
Copy link
Copy Markdown
Contributor

@elharo elharo commented Dec 9, 2024

No description provided.

@elharo elharo marked this pull request as ready for review December 9, 2024 15:53
@elharo elharo merged commit 5c7616e into master Dec 9, 2024
@elharo elharo deleted the close branch December 9, 2024 18:32
Git git = null;
try {
git = JGitUtils.openRepo(fileSet.getBasedir());
try (Git git = JGitUtils.openRepo(fileSet.getBasedir())) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This actually introduced a regression, because closing git is not the same as calling JGitUtils.closeRepo(git)! Fixed in https://github.com/apache/maven-scm/pull/1271/files#diff-69ae8c5f67669f23b40308b3fb41313eeb78ac35a247a28de76b68f5b99de9e8R91.

@kwin kwin added enhancement New feature or request maintenance and removed enhancement New feature or request labels Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants