aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-10-10 08:02:30 +0200
committerShawn O. Pearce <spearce@spearce.org>2012-10-25 15:17:23 -0700
commit81fa5662953c54ba07e141284d3d9a717361b17b (patch)
tree958ada4e4c6b7b385d50fac305333c3646988dde /org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java
parentbc8794eb21319c3251cd778133541d60856eb626 (diff)
downloadjgit-81fa5662953c54ba07e141284d3d9a717361b17b.tar.gz
jgit-81fa5662953c54ba07e141284d3d9a717361b17b.zip
Suppress resource warnings with Java 7
For streams that should not be closed, i.e. don't own an underlying stream, and in-memory streams that do not need to be closed we just suppress the warning. This mostly apply to test cases. GC is enough. For streams with external resources (i.e. files) we add the necessary call to close(). Change-Id: I4d883ba2e7d07f199fe57ccb3459ece00441a570
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java
index cb3c7d88f0..baa0d094d5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java
@@ -128,6 +128,7 @@ public class SubmoduleWalkTest extends RepositoryTestCase {
assertFalse(gen.next());
}
+ @SuppressWarnings("resource" /* java 7 */)
@Test
public void repositoryWithRootLevelSubmoduleAbsoluteRef()
throws IOException, ConfigInvalidException {
@@ -176,6 +177,7 @@ public class SubmoduleWalkTest extends RepositoryTestCase {
assertFalse(gen.next());
}
+ @SuppressWarnings("resource" /* java 7 */)
@Test
public void repositoryWithRootLevelSubmoduleRelativeRef()
throws IOException, ConfigInvalidException {