Fix stream closing issue

This commit is contained in:
Ghost_chu committed 2021-02-26 19:29:17 +08:00
1 parent 87df39cf23
commit 6be108c096
1 file changed
+1 -2
@@ -36,9 +36,8 @@ public class JarVerifyTool {
Enumeration<JarEntry> entries = jar.entries();
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
try {
try (InputStream is = jar.getInputStream(entry)) {
byte[] buffer = new byte[8192];
InputStream is = jar.getInputStream(entry);
//noinspection StatementWithEmptyBody
while ((is.read(buffer, 0, buffer.length)) != -1) {
// We just read. This will throw a SecurityException