Skip to content

Commit

Permalink
Suppress resource leak warning for instantiated Git object
Browse files Browse the repository at this point in the history
  • Loading branch information
dbwiddis authored and mathieucarbou committed Jan 17, 2022
1 parent 3f4168a commit 47e353d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ String getAuthorEmailOfCreation(File file) throws IOException, GitAPIException {
}

private boolean isFileModifiedOrUnstaged(String repoRelativePath) throws GitAPIException {
@SuppressWarnings("resource")
Status status = new Git(repository).status().addPath(repoRelativePath).call();
return !status.isClean();
}
Expand Down

0 comments on commit 47e353d

Please sign in to comment.