Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2019-10-14 16:15:24 -0400
committerMichael Keppler2019-10-16 11:15:36 -0400
commit0afe804e28ae54b04e0acaebb2fb8198d92b24ba (patch)
tree1e3a4f66bee1e97d1dbdce7f2dc332c173c5e1e0 /org.eclipse.egit.ui
parent0756f4d648f24ef07e4c3ad0230dbb332ec26308 (diff)
downloadegit-0afe804e28ae54b04e0acaebb2fb8198d92b24ba.tar.gz
egit-0afe804e28ae54b04e0acaebb2fb8198d92b24ba.tar.xz
egit-0afe804e28ae54b04e0acaebb2fb8198d92b24ba.zip
Close SubmoduleWalk in RepositoriesViewContentProvider
Change-Id: If01f7682057397f4829b5ea4760ef2e76f188d40 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java
index 0fb5171b3..f50a9b74a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java
@@ -335,9 +335,8 @@ public class RepositoriesViewContentProvider implements ITreeContentProvider,
case SUBMODULES:
List<RepositoryNode> children = new ArrayList<>();
- try {
- SubmoduleWalk walk = SubmoduleWalk.forIndex(node
- .getRepository());
+ try (SubmoduleWalk walk = SubmoduleWalk
+ .forIndex(node.getRepository())) {
while (walk.next()) {
Repository subRepo = walk.getRepository();
if (subRepo != null) {

Back to the top