1 package org.apache.commons.javaflow.bytecode.transformation.rewrite; 2 3 /** 4 * Regression test case. 5 * 6 * <p> 7 * When the stack size reaches the maximum in a constructor method invocation, 8 * there was a bug where we failed to expand the stack size appropriately. 9 * 10 * This is a regression test for that case. 11 * 12 * 13 * @author Kohsuke Kawaguchi 14 */ 15 public final class Stack implements Runnable { 16 public void run() { 17 final Object o = foo("abc","def"); 18 } 19 20 private Object foo(String a, String b) { 21 return new StrStr(a,b); 22 } 23 24 private static final class StrStr { 25 private final String value; 26 27 public StrStr(String a, String b) { 28 value = a+b; 29 } 30 31 public String toString() { 32 return value; 33 } 34 } 35 }