### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java,v retrieving revision 1.25 diff -u -r1.25 MemberValuePair.java --- compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java 28 Oct 2006 04:11:27 -0000 1.25 +++ compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java 8 Dec 2006 16:22:32 -0000 @@ -199,6 +199,19 @@ if (leafType.isAnnotationType()) { if (!valueType.leafComponentType().isAnnotationType()) { // check annotation type and also reject null literal scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); + } else if (this.value instanceof ArrayInitializer) { + ArrayInitializer initializer = (ArrayInitializer) this.value; + final Expression[] expressions = initializer.expressions; + if (expressions != null) { + for (int i =0, max = expressions.length; i < max; i++) { + Expression currentExpression = expressions[i]; + if (currentExpression instanceof NullLiteral || !(currentExpression instanceof Annotation)) { + scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, currentExpression, leafType); + } + } + } + } else if (!(this.value instanceof Annotation)) { + scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); } break checkAnnotationMethodType; }