fix last remaining try-with-resources candidate
@@ -130,16 +130,8 @@ public void finish() throws IOException {
if (properties != null) {
p.properties().putAll(properties);
}
- JarInputStream ji = null;
- boolean success = false;
- try {
- ji = new JarInputStream(streamBridge.getInput());
+ try (JarInputStream ji = new JarInputStream(streamBridge.getInput())) {
p.pack(ji, originalOutput);
- success = true;
- } finally {
- if (!success) {
- IOUtils.closeQuietly(ji);
- }
}
}
}
