|
|
|
@ -186,8 +186,7 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable { |
|
|
|
|
|
|
|
|
|
|
|
private long getNestedLibraryTime(File file) { |
|
|
|
private long getNestedLibraryTime(File file) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
JarFile jarFile = new JarFile(file); |
|
|
|
try (JarFile jarFile = new JarFile(file)) { |
|
|
|
try { |
|
|
|
|
|
|
|
Enumeration<JarEntry> entries = jarFile.entries(); |
|
|
|
Enumeration<JarEntry> entries = jarFile.entries(); |
|
|
|
while (entries.hasMoreElements()) { |
|
|
|
while (entries.hasMoreElements()) { |
|
|
|
JarEntry entry = entries.nextElement(); |
|
|
|
JarEntry entry = entries.nextElement(); |
|
|
|
@ -196,9 +195,6 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
finally { |
|
|
|
|
|
|
|
jarFile.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) { |
|
|
|
catch (Exception ex) { |
|
|
|
// Ignore and just use the source file timestamp
|
|
|
|
// Ignore and just use the source file timestamp
|
|
|
|
@ -381,13 +377,9 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable { |
|
|
|
private long size; |
|
|
|
private long size; |
|
|
|
|
|
|
|
|
|
|
|
CrcAndSize(File file) throws IOException { |
|
|
|
CrcAndSize(File file) throws IOException { |
|
|
|
FileInputStream inputStream = new FileInputStream(file); |
|
|
|
try (FileInputStream inputStream = new FileInputStream(file)) { |
|
|
|
try { |
|
|
|
|
|
|
|
load(inputStream); |
|
|
|
load(inputStream); |
|
|
|
} |
|
|
|
} |
|
|
|
finally { |
|
|
|
|
|
|
|
inputStream.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CrcAndSize(InputStream inputStream) throws IOException { |
|
|
|
CrcAndSize(InputStream inputStream) throws IOException { |
|
|
|
|