use try-with-resources for git repository

This commit is contained in:
Sebastian Sdorra
2018-08-30 13:29:52 +02:00
parent d4ed3b72d3
commit 9725f2d19f

View File

@@ -172,10 +172,8 @@ public class GitLogCommand extends AbstractGitCommand implements LogCommand
GitChangesetConverter converter = null;
RevWalk revWalk = null;
try
try (org.eclipse.jgit.lib.Repository gr = open())
{
org.eclipse.jgit.lib.Repository gr = open();
if (!gr.getAllRefs().isEmpty())
{
int counter = 0;