aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
index 968041c3a5..a1ea790d0d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
@@ -94,8 +94,7 @@ public class SubmoduleStatusCommand extends
public Map<String, SubmoduleStatus> call() throws GitAPIException {
checkCallable();
- try {
- SubmoduleWalk generator = SubmoduleWalk.forIndex(repo);
+ try (SubmoduleWalk generator = SubmoduleWalk.forIndex(repo)) {
if (!paths.isEmpty())
generator.setFilter(PathFilterGroup.createFromStrings(paths));
Map<String, SubmoduleStatus> statuses = new HashMap<String, SubmoduleStatus>();