Browse Source

CGitVsJGitRandomIgnorePatternTest: Open OutputStream in try-with-resource

Change-Id: I08e27d0ee48dabd94a4eeb608508f815a3000ec9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.11
David Pursehouse 7 years ago
parent
commit
903f1d1639
  1. 4
      org.eclipse.jgit.test/exttst/org/eclipse/jgit/ignore/CGitVsJGitRandomIgnorePatternTest.java

4
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();
try (OutputStream out = proc.getOutputStream()) {
out.write((path + "\n").getBytes(UTF_8));
out.flush();
out.close();
}
return proc;
}

Loading…
Cancel
Save