View | Details | Raw Unified | Return to bug 126332
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+2 lines)
Lines 1076-1081 Link Here
1076
	int TypeMissingDeprecatedAnnotation = Internal + 630;
1076
	int TypeMissingDeprecatedAnnotation = Internal + 630;
1077
	/** @since 3.1 */
1077
	/** @since 3.1 */
1078
	int UnhandledWarningToken = Internal + 631;
1078
	int UnhandledWarningToken = Internal + 631;
1079
	/** @since 3.2 */
1080
	int AnnotationValueAsArrayMustBeArrayInitializer = Internal + 632;
1079
	
1081
	
1080
	/**
1082
	/**
1081
	 * Corrupted binaries
1083
	 * Corrupted binaries
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+1 lines)
Lines 519-524 Link Here
519
629 = The deprecated method {0}({1}) of type {2} should be annotated with @Deprecated
519
629 = The deprecated method {0}({1}) of type {2} should be annotated with @Deprecated
520
630 = The deprecated type {0} should be annotated with @Deprecated
520
630 = The deprecated type {0} should be annotated with @Deprecated
521
631 = Unhandled warning token {0}
521
631 = Unhandled warning token {0}
522
632 = The array creation is unnecessary in an annotation value; only an array initializer is allowed
522
523
523
### CORRUPTED BINARIES
524
### CORRUPTED BINARIES
524
700 = The class file {0} contains a signature ''{1}'' ill-formed at position {2}
525
700 = The class file {0} contains a signature ''{1}'' ill-formed at position {2}
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-1 / +8 lines)
Lines 203-209 Link Here
203
		superInterfaceRef.sourceStart,
203
		superInterfaceRef.sourceStart,
204
		superInterfaceRef.sourceEnd);
204
		superInterfaceRef.sourceEnd);
205
}
205
}
206
206
public void annotationValueAsArrayMustBeArrayInitializer(Expression value) {
207
	this.handle(
208
			IProblem.AnnotationValueAsArrayMustBeArrayInitializer,
209
			NoArgument,
210
			NoArgument,
211
			value.sourceStart,
212
			value.sourceEnd);
213
}
207
public void annotationValueMustBeAnnotation(TypeBinding annotationType, char[] name, Expression value, TypeBinding expectedType) {
214
public void annotationValueMustBeAnnotation(TypeBinding annotationType, char[] name, Expression value, TypeBinding expectedType) {
208
	String str = new String(name);
215
	String str = new String(name);
209
	this.handle(
216
	this.handle(
(-)compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java (+2 lines)
Lines 77-82 Link Here
77
			if ((initializer.resolveTypeExpecting(scope, this.binding.returnType)) != null) {
77
			if ((initializer.resolveTypeExpecting(scope, this.binding.returnType)) != null) {
78
				this.value.resolvedType = initializer.binding = (ArrayBinding) this.binding.returnType;
78
				this.value.resolvedType = initializer.binding = (ArrayBinding) this.binding.returnType;
79
			}			
79
			}			
80
		} else if (this.value instanceof ArrayAllocationExpression) {
81
			scope.problemReporter().annotationValueAsArrayMustBeArrayInitializer(this.value);				
80
		} else {
82
		} else {
81
			this.value.resolveType(scope);
83
			this.value.resolveType(scope);
82
		}
84
		}

Return to bug 126332