Summary: | [editor] Editor shows an error on 'case' label with enum constant | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AJDT | Reporter: | David Pytel <pytel.dawid> | ||||
Component: | UI | Assignee: | AJDT-inbox <AJDT-inbox> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P1 | CC: | andrew.eisenberg | ||||
Version: | 1.6.2 | ||||||
Target Milestone: | 1.6.2 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
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. |
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.