Community
Participate
Working Groups
Created attachment 120359 [details] Project in which the bug appears Build ID: M20080911-1700 Steps To Reproduce: 1. Create aspect with some method 2. Add switch statement. 3. Add case label with enum constant More information: AJDT version: 1.6.2.20081211185107 from JDT Weaving Example code where the error appears: package none; /** * @author Dawid Pytel * */ public aspect AspectWithSwitch { public enum SomeEnum { VAL1 } public void foo() { SomeEnum e = SomeEnum.VAL1; switch (e) { case VAL1: // here the error appears System.out.println("Val1"); break; } } } If I move this piece of code to a Java class everything is perfectly fine. Error appears only when aspect is in .aj file.
Thanks for the test case. Will look into it now.
Seems that our aspects transformer doesn't handle case statements properly (regardless of the enum. It is confusing case statements with pointcut declarations! Made the change, and tested it. The project you submitted is now part of the test case. Committed.