diff options
Diffstat (limited to 'org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/pr/CheckoutPullRequestHandler.java')
-rw-r--r-- | org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/pr/CheckoutPullRequestHandler.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/pr/CheckoutPullRequestHandler.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/pr/CheckoutPullRequestHandler.java index b063ef5c..10e6f78a 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/pr/CheckoutPullRequestHandler.java +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/pr/CheckoutPullRequestHandler.java @@ -61,11 +61,8 @@ public class CheckoutPullRequestHandler extends TaskDataHandler { private RevCommit getBase(Repository repo, PullRequest request) throws IOException { - RevWalk walk = new RevWalk(repo); - try { + try (RevWalk walk = new RevWalk(repo)) { return walk.parseCommit(repo.resolve(request.getBase().getSha())); - } finally { - walk.release(); } } |