diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/asm/ClassMetadataReader.java b/LaunchServer/src/main/java/ru/gravit/launchserver/asm/ClassMetadataReader.java index 53cf3e89..c1f07859 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/asm/ClassMetadataReader.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/asm/ClassMetadataReader.java @@ -23,7 +23,7 @@ private class CheckSuperClassVisitor extends ClassVisitor { String superClassName; public CheckSuperClassVisitor() { - super(Opcodes.ASM5); + super(Opcodes.ASM7); } @Override @@ -57,10 +57,13 @@ public void acceptVisitor(String className, ClassVisitor visitor) throws IOExcep public byte[] getClassData(String className) throws IOException { for (JarFile f : cp) { - if (f.getEntry(className + ".class") != null) + if (f.getEntry(className + ".class") != null) { + byte[] bytes = null; try (InputStream in = f.getInputStream(f.getEntry(className + ".class"))) { - return IOHelper.read(in); + bytes = IOHelper.read(in); } + return bytes; + } } return IOHelper.read(IOHelper.getResourceURL(className + ".class")); }