diff --git a/src/main/java/pdd/vm/mw/MwBin.java b/src/main/java/pdd/vm/mw/MwBin.java index 09ff81e..0b9228c 100644 --- a/src/main/java/pdd/vm/mw/MwBin.java +++ b/src/main/java/pdd/vm/mw/MwBin.java @@ -84,17 +84,17 @@ public HashMap convert(List classes) throws IOExcepti } for (ClassData.MethodData method : cls.methods) { - if (method.code != null) { - MethodVisitor mv = cw.visitMethod(method.accessFlags, method.name, method.desc, null, null); - - for (Map.Entry> entry : method.annotations.entrySet()) { - final AnnotationVisitor av = mv.visitAnnotation(entry.getKey(), true); - for (Map.Entry annEntry : entry.getValue().entrySet()) { - visitAnnotation(av, annEntry.getKey(), annEntry.getValue()); - } - av.visitEnd(); + MethodVisitor mv = cw.visitMethod(method.accessFlags, method.name, method.desc, null, null); + + for (Map.Entry> entry : method.annotations.entrySet()) { + final AnnotationVisitor av = mv.visitAnnotation(entry.getKey(), true); + for (Map.Entry annEntry : entry.getValue().entrySet()) { + visitAnnotation(av, annEntry.getKey(), annEntry.getValue()); } + av.visitEnd(); + } + if (method.code != null) { MwCode.parseCode(method.code, constPool, fieldRefTypeSet, mv); } } @@ -228,7 +228,6 @@ private static Map readSign(InputStream input, int version) thro } - public static void toClassesJar(File inFile, File dest) throws IOException { if (!inFile.exists()) { throw new FileNotFoundException(inFile.getAbsolutePath());