aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/exttst
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/exttst')
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/ignore/CGitVsJGitRandomIgnorePatternTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/ignore/CGitVsJGitRandomIgnorePatternTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/ignore/CGitVsJGitRandomIgnorePatternTest.java
index 03b34acc05..438d2d625b 100644
--- a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/ignore/CGitVsJGitRandomIgnorePatternTest.java
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/ignore/CGitVsJGitRandomIgnorePatternTest.java
@@ -187,10 +187,10 @@ public class CGitVsJGitRandomIgnorePatternTest {
"--no-index", "-v", "-n", "--stdin" };
Process proc = Runtime.getRuntime().exec(command, new String[0],
gitDir);
- OutputStream out = proc.getOutputStream();
- out.write((path + "\n").getBytes(UTF_8));
- out.flush();
- out.close();
+ try (OutputStream out = proc.getOutputStream()) {
+ out.write((path + "\n").getBytes(UTF_8));
+ out.flush();
+ }
return proc;
}