changeset 1358:c9e016659bfe

7901812: ASM generator treats "<init>" methods are regular methods
author shade
date Fri, 30 Sep 2016 11:04:24 +0200
parents b35ea744ed81
children 950f2655fa2b
files jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMClassInfo.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMClassInfo.java	Thu Sep 29 17:44:27 2016 +0200
+++ b/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMClassInfo.java	Fri Sep 30 11:04:24 2016 +0200
@@ -120,9 +120,10 @@
     public MethodVisitor visitMethod(int access, final String methodName, String methodDesc, String signature, String[] exceptions) {
         ASMMethodInfo mi = new ASMMethodInfo(super.visitMethod(access, methodName, methodDesc, signature, exceptions),
                 classInfos, this, access, methodName, methodDesc, signature);
-        methods.add(mi);
         if (methodName.equals("<init>")) {
             constructors.add(mi);
+        } else {
+            methods.add(mi);
         }
         return mi;
     }