Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java
index 3db27926c6..d5d3857ca4 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java
@@ -111,14 +111,12 @@ public class IndexDiffWithSymlinkTest extends LocalDiskRepositoryTestCase {
&& FS.DETECTED.supportsSymlinks());
super.setUp();
File testDir = createTempDirectory(this.getClass().getSimpleName());
- InputStream in = this.getClass().getClassLoader().getResourceAsStream(
+ try (InputStream in = this.getClass().getClassLoader()
+ .getResourceAsStream(
this.getClass().getPackage().getName().replace('.', '/') + '/'
- + FILEREPO + ".txt");
- assertNotNull("Test repo file not found", in);
- try {
+ + FILEREPO + ".txt")) {
+ assertNotNull("Test repo file not found", in);
testRepoDir = restoreGitRepo(in, testDir, FILEREPO);
- } finally {
- in.close();
}
}

Back to the top