Commit 89d27e58 authored by Andy Wilkinson's avatar Andy Wilkinson

Close input stream after adding entry to jar in DevTools tests

Closes gh-11089
parent 85dc89e1
......@@ -72,7 +72,13 @@ public class JarFileRemoteApplicationLauncher extends RemoteApplicationLauncher
file.getAbsolutePath().substring(root.getAbsolutePath().length() + 1)
.replace("\\", "/") + (file.isDirectory() ? "/" : "")));
if (file.isFile()) {
StreamUtils.copy(new FileInputStream(file), output);
FileInputStream input = new FileInputStream(file);
try {
StreamUtils.copy(input, output);
}
finally {
input.close();
}
}
output.closeEntry();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment