Community
Participate
Working Groups
Created attachment 277722 [details] Test case The AnnotationMirror.getElementValues keys have wrong ExecutableElements when the Annotation is nested in a generic type. The ExecutableElements got from AnnotationMirror.getElementValues() have ParameterizedMethodBindings while the ExecutableElements got from AnnotationMirror.getAnnotationType().asElement().getEnclosedElements() have MethodBindings. This causes problem that the following code does not work: ExecutableElement valueMethod = null; for (ExecutableElement method : ElementFilter.methodsIn(mirror.getAnnotationType().asElement().getEnclosedElements())) { if (method.getSimpleName().toString().equals(name)) { valueMethod = method; break; } } if (valueMethod != null) { AnnotationValue value = mirror.getElementValues().get(valueMethod); } Tested with ecj-4.6.1 & ecj-4.5.1, both have this problem.
I've added a test case. 1. Unpack the testcase. 2. cd test 3. ant build # compiles with Javac - works fine 4. ant clean 5. ant buildecj # build fails with ---------- [java] 1. ERROR in /Users/tom/Downloads/jdt/test/src/org/tzezula/jdt/test/Test.java (at line 7) [java] public class Test extends Language<Test.Context> { [java] ^^^^ [java] Missing name [java] ----------
4.5/4.6 is too old. Could you please check with 4.11 RC1?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.