Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>tags/V1_9_20
@@ -0,0 +1,20 @@ | |||
public class SwitchCaseWith_Integer_MAX_VALUE { | |||
public static void main(String[] args) { | |||
System.out.println(switchTest(Integer.MAX_VALUE)); | |||
} | |||
static String switchTest(int i) { | |||
switch (i) { | |||
case Integer.MAX_VALUE: | |||
return "CASE_1"; | |||
default: | |||
return ""; | |||
} | |||
} | |||
} | |||
aspect MyAspect { | |||
before() : execution(* switchTest(*)) { | |||
System.out.println(thisJoinPoint); | |||
} | |||
} |
@@ -19,6 +19,9 @@ public class Bugs1919Tests extends XMLBasedAjcTestCase { | |||
runTest("declare annotation with SOURCE retention"); | |||
} | |||
public void testsSwitchWith_Integer_MAX_VALUE() { | |||
runTest("switch with Integer.MAX_VALUE case"); | |||
} | |||
public static Test suite() { | |||
return XMLBasedAjcTestCase.loadSuite(Bugs1919Tests.class); | |||
} |
@@ -172,4 +172,17 @@ | |||
</compile> | |||
</ajc-test> | |||
<!-- RuntimeException in BcelWeaver, see https://github.com/eclipse/org.aspectj/issues/190 --> | |||
<ajc-test dir="bugs1919/github_190" vm="1.5" title="switch with Integer.MAX_VALUE case"> | |||
<compile files="SwitchCaseWith_Integer_MAX_VALUE.java" options="-1.5 -showWeaveInfo"> | |||
<message kind="weave" text="Join point 'method-execution(java.lang.String SwitchCaseWith_Integer_MAX_VALUE.switchTest(int))'"/> | |||
</compile> | |||
<run class="SwitchCaseWith_Integer_MAX_VALUE"> | |||
<stdout> | |||
<line text="execution(String SwitchCaseWith_Integer_MAX_VALUE.switchTest(int))"/> | |||
<line text="CASE_1"/> | |||
</stdout> | |||
</run> | |||
</ajc-test> | |||
</suite> |