title: ASM COMPUTE_MAXS not working for basic test case?
body: <p>At the bottom of the post is the test case. It gives the following error. But I have set <code>new ClassWriter(ClassWriter.COMPUTE_MAXS)</code> so shouldn't it be automatically calculating the max stack and setting it properly?</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: Error at instruction 2: Insufficient maximum stack size. testMethod()Ljava/lang/Object;
  00000  :  :    L0
  00001  :  :     LINENUMBER 22 L0
  00002  :  :     ACONST_NULL
  00003 ? :     ARETURN
  </code></pre>
  
  <p>Test case:</p>
  
  <pre><code>public static void main(String[] args) {
      ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
      CheckClassAdapter cv = new CheckClassAdapter(cw);
      cv.visit(V1_7, ACC_PUBLIC + ACC_SUPER, "path/Cls", null, "java/lang/Object", null);
      {
          MethodVisitor mv = cv.visitMethod(ACC_PUBLIC, "&lt;init&gt;", "()V", null, null);
          mv.visitCode();
          Label l0 = new Label();
          mv.visitLabel(l0);
          mv.visitVarInsn(ALOAD, 0);
          mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "&lt;init&gt;", "()V");
          mv.visitInsn(RETURN);
          Label l1 = new Label();
          mv.visitLabel(l1);
          mv.visitLocalVariable("this", "L" + "path/Cls" + ";", null, l0, l1, 0);
          mv.visitMaxs(1, 1);
          mv.visitEnd();
      }
      {
          MethodVisitor mv = cv
                  .visitMethod(ACC_PUBLIC + ACC_STATIC, "testMethod", "()Ljava/lang/Object;", null, null);
          mv.visitCode();
          Label l0 = new Label();
          mv.visitLabel(l0);
          mv.visitLineNumber(22, l0);
          mv.visitInsn(ACONST_NULL);
          mv.visitInsn(ARETURN);
          mv.visitMaxs(0, 0); // Same error even if this is commented out
          mv.visitEnd();
      }
  
      byte[] byteArray = cw.toByteArray();
  }
  </code></pre>