Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 339478 | Differences between
and this patch

Collapse All | Expand All

(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (+4 lines)
Lines 3495-3500 Link Here
3495
			} else if (token.equals("typeHiding")) { //$NON-NLS-1$
3495
			} else if (token.equals("typeHiding")) { //$NON-NLS-1$
3496
				setSeverity(CompilerOptions.OPTION_ReportTypeParameterHiding, severity, isEnabling);
3496
				setSeverity(CompilerOptions.OPTION_ReportTypeParameterHiding, severity, isEnabling);
3497
				return;
3497
				return;
3498
			} else if (token.equals("typeArgRedundant") /*|| token.equals("redundantSuperinterface")*/) { //$NON-NLS-1$
3499
				setSeverity(CompilerOptions.OPTION_ReportRedundantDeclarationOfTypeArguments, severity, isEnabling);
3500
				return;
3498
			}
3501
			}
3499
			break;
3502
			break;
3500
		case 'u' :
3503
		case 'u' :
Lines 3539-3544 Link Here
3539
				setSeverity(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, severity, isEnabling);
3542
				setSeverity(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, severity, isEnabling);
3540
				setSeverity(CompilerOptions.OPTION_ReportUnusedLabel, severity, isEnabling);
3543
				setSeverity(CompilerOptions.OPTION_ReportUnusedLabel, severity, isEnabling);
3541
				setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling);
3544
				setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling);
3545
				setSeverity(CompilerOptions.OPTION_ReportRedundantDeclarationOfTypeArguments, severity, isEnabling);
3542
				return;
3546
				return;
3543
			} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
3547
			} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
3544
				setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling);
3548
				setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling);
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (-1 / +4 lines)
Lines 1377-1383 Link Here
1377
	int MultiCatchNotBelow17 =  Syntax + Internal + 875;
1377
	int MultiCatchNotBelow17 =  Syntax + Internal + 875;
1378
	/** @since 3.7 */
1378
	/** @since 3.7 */
1379
	int PolymorphicMethodNotBelow17 = MethodRelated + 876;
1379
	int PolymorphicMethodNotBelow17 = MethodRelated + 876;
1380
1380
	/** @since 3.7 */
1381
	int InvalidUsageOfDiamondConstruct = Syntax + TypeRelated + 877;
1382
    /** @since 3.7 */
1383
	int RedundantDeclarationOfTypeArguments = FieldRelated + Internal + 878; 
1381
	/**
1384
	/**
1382
	 * External problems -- These are problems defined by other plugins
1385
	 * External problems -- These are problems defined by other plugins
1383
	 */
1386
	 */
(-)compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java (-2 / +15 lines)
Lines 29-35 Link Here
29
	public TypeReference[] typeArguments;
29
	public TypeReference[] typeArguments;
30
	public TypeBinding[] genericTypeArguments;
30
	public TypeBinding[] genericTypeArguments;
31
	public FieldDeclaration enumConstant; // for enum constant initializations
31
	public FieldDeclaration enumConstant; // for enum constant initializations
32
32
	private TypeBinding expectedType;
33
	
33
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
34
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
34
	// check captured variables are initialized in current context (26134)
35
	// check captured variables are initialized in current context (26134)
35
	checkCapturedLocalInitializationIfNecessary((ReferenceBinding)this.binding.declaringClass.erasure(), currentScope, flowInfo);
36
	checkCapturedLocalInitializationIfNecessary((ReferenceBinding)this.binding.declaringClass.erasure(), currentScope, flowInfo);
Lines 255-261 Link Here
255
		// initialization of an enum constant
256
		// initialization of an enum constant
256
		this.resolvedType = scope.enclosingReceiverType();
257
		this.resolvedType = scope.enclosingReceiverType();
257
	} else {
258
	} else {
258
		this.resolvedType = this.type.resolveType(scope, true /* check bounds*/);
259
		TypeBinding inferredArguments[] = null;
260
		if ((this.type.bits & ASTNode.IsDiamond) != 0) {
261
			if (this.expectedType.isParameterizedTypeWithActualArguments())
262
				inferredArguments = ((ParameterizedTypeBinding)this.expectedType).arguments;
263
		}
264
		this.resolvedType = this.type.resolveType(scope, true /* check bounds*/, inferredArguments);
259
		checkParameterizedAllocation: {
265
		checkParameterizedAllocation: {
260
			if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
266
			if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
261
				ReferenceBinding currentType = (ReferenceBinding)this.resolvedType;
267
				ReferenceBinding currentType = (ReferenceBinding)this.resolvedType;
Lines 409-412 Link Here
409
	}
415
	}
410
	visitor.endVisit(this, scope);
416
	visitor.endVisit(this, scope);
411
}
417
}
418
/**
419
 * @see org.eclipse.jdt.internal.compiler.ast.Expression#setExpectedType(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
420
 */
421
public void setExpectedType(TypeBinding expectedType) {
422
	this.expectedType = expectedType;
423
}
424
412
}
425
}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java (+3 lines)
Lines 217-222 Link Here
217
217
218
				if (fieldType != initializationType) // must call before computeConversion() and typeMismatchError()
218
				if (fieldType != initializationType) // must call before computeConversion() and typeMismatchError()
219
					initializationScope.compilationUnitScope().recordTypeConversion(fieldType, initializationType);
219
					initializationScope.compilationUnitScope().recordTypeConversion(fieldType, initializationType);
220
				else if (initializationScope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7 &&
221
						initializationType.isParameterizedTypeWithActualArguments())
222
					initializationScope.problemReporter().redundantDeclarationOfTypeArguments(this.initialization, ((ParameterizedTypeBinding)initializationType).arguments);
220
				if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, fieldType)
223
				if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, fieldType)
221
						|| initializationType.isCompatibleWith(fieldType)) {
224
						|| initializationType.isCompatibleWith(fieldType)) {
222
					this.initialization.computeConversion(initializationScope, fieldType, initializationType);
225
					this.initialization.computeConversion(initializationScope, fieldType, initializationType);
(-)compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java (-2 / +14 lines)
Lines 157-163 Link Here
157
	}
157
	}
158
158
159
	public void resolve(BlockScope scope) {
159
	public void resolve(BlockScope scope) {
160
160
		boolean isCompliant17 = scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_7;
161
		// create a binding and add it to the scope
161
		// create a binding and add it to the scope
162
		TypeBinding variableType = this.type.resolveType(scope, true /* check bounds*/);
162
		TypeBinding variableType = this.type.resolveType(scope, true /* check bounds*/);
163
163
Lines 171-176 Link Here
171
				scope.problemReporter().variableTypeCannotBeVoidArray(this);
171
				scope.problemReporter().variableTypeCannotBeVoidArray(this);
172
				return;
172
				return;
173
			}
173
			}
174
			if (isCompliant17 && variableType.isParameterizedType() && (this.type.bits & ASTNode.IsDiamond) != 0) {
175
				scope.problemReporter().incorrectArityForParameterizedType(this.type, variableType.original(), ((ParameterizedTypeBinding)variableType).arguments);
176
				return;
177
			}
174
		}
178
		}
175
179
176
		Binding existingVariable = scope.getBinding(this.name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
180
		Binding existingVariable = scope.getBinding(this.name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
Lines 207-218 Link Here
207
				}
211
				}
208
			} else {
212
			} else {
209
			    this.initialization.setExpectedType(variableType);
213
			    this.initialization.setExpectedType(variableType);
214
			    boolean isDiamond = false;
210
				TypeBinding initializationType = this.initialization.resolveType(scope);
215
				TypeBinding initializationType = this.initialization.resolveType(scope);
216
				if (this.initialization instanceof AllocationExpression) {
217
					if (isCompliant17 && (((AllocationExpression) this.initialization).type.bits & ASTNode.IsDiamond) != 0)
218
						isDiamond = true;
219
				}
211
				if (initializationType != null) {
220
				if (initializationType != null) {
212
					if (variableType != initializationType) // must call before computeConversion() and typeMismatchError()
221
					if (variableType != initializationType) // must call before computeConversion() and typeMismatchError()
213
						scope.compilationUnitScope().recordTypeConversion(variableType, initializationType);
222
						scope.compilationUnitScope().recordTypeConversion(variableType, initializationType);
223
					else if (isCompliant17 && initializationType.isParameterizedTypeWithActualArguments()) {
224
						scope.problemReporter().redundantDeclarationOfTypeArguments(this.initialization, ((ParameterizedTypeBinding)initializationType).arguments);
225
					}
214
					if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, variableType)
226
					if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, variableType)
215
						|| initializationType.isCompatibleWith(variableType)) {
227
						|| initializationType.isCompatibleWith(variableType, isDiamond)) {
216
						this.initialization.computeConversion(scope, variableType, initializationType);
228
						this.initialization.computeConversion(scope, variableType, initializationType);
217
						if (initializationType.needsUncheckedConversion(variableType)) {
229
						if (initializationType.needsUncheckedConversion(variableType)) {
218
						    scope.problemReporter().unsafeTypeConversion(this.initialization, initializationType, variableType);
230
						    scope.problemReporter().unsafeTypeConversion(this.initialization, initializationType, variableType);
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java (-3 / +24 lines)
Lines 27-32 Link Here
27
public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeReference {
27
public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeReference {
28
28
29
	public TypeReference[][] typeArguments;
29
	public TypeReference[][] typeArguments;
30
	public TypeBinding[] inferredTypeArgs;
30
31
31
	/**
32
	/**
32
	 * @param tokens
33
	 * @param tokens
Lines 37-42 Link Here
37
38
38
		super(tokens, dim, positions);
39
		super(tokens, dim, positions);
39
		this.typeArguments = typeArguments;
40
		this.typeArguments = typeArguments;
41
		this.inferredTypeArgs = null;
40
	}
42
	}
41
	public void checkBounds(Scope scope) {
43
	public void checkBounds(Scope scope) {
42
		if (this.resolvedType == null) return;
44
		if (this.resolvedType == null) return;
Lines 68-73 Link Here
68
	 * @return char[][]
70
	 * @return char[][]
69
	 */
71
	 */
70
	public char [][] getParameterizedTypeName(){
72
	public char [][] getParameterizedTypeName(){
73
		if ((this.bits & ASTNode.IsDiamond) != 0)
74
			return this.getTypeName();
71
		int length = this.tokens.length;
75
		int length = this.tokens.length;
72
		char[][] qParamName = new char[length][];
76
		char[][] qParamName = new char[length][];
73
		for (int i = 0; i < length; i++) {
77
		for (int i = 0; i < length; i++) {
Lines 222-227 Link Here
222
						argTypes[j] = argType;
226
						argTypes[j] = argType;
223
					}
227
					}
224
				}
228
				}
229
				if (argLength == 0 && (this.bits & ASTNode.IsDiamond) != 0 && this.inferredTypeArgs != null) {
230
					argTypes = this.inferredTypeArgs;
231
				}
225
				if (argHasError) {
232
				if (argHasError) {
226
					return null;
233
					return null;
227
				}
234
				}
Lines 247-254 Link Here
247
					}
254
					}
248
					return this.resolvedType;
255
					return this.resolvedType;
249
				} else if (argLength != typeVariables.length) { // check arity
256
				} else if (argLength != typeVariables.length) { // check arity
250
					scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes, i);
257
					if(scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_7 && argLength == 0) {
251
					return null;
258
						if ((this.bits & ASTNode.IsDiamond) ==0) {
259
							scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
260
							return null;
261
						}
262
						// argLength = 0 ok if its the diamond case for compliance >= 1.7
263
						// also no need to check bounds for such a case
264
						checkBounds = false;
265
					} else {
266
						scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes, i);
267
						return null;
268
					}
252
				}
269
				}
253
				// check parameterizing non-static member type of raw type
270
				// check parameterizing non-static member type of raw type
254
				if (typeIsConsistent && !currentType.isStatic()) {
271
				if (typeIsConsistent && !currentType.isStatic()) {
Lines 343-349 Link Here
343
		}
360
		}
344
		return output;
361
		return output;
345
	}
362
	}
346
363
	
364
	public TypeBinding resolveType(BlockScope scope, boolean checkBounds, TypeBinding[] inferredArgs) {
365
		this.inferredTypeArgs = inferredArgs;
366
	    return internalResolveType(scope, checkBounds);
367
	}
347
	public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {
368
	public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {
348
	    return internalResolveType(scope, checkBounds);
369
	    return internalResolveType(scope, checkBounds);
349
	}
370
	}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java (-2 / +25 lines)
Lines 27-37 Link Here
27
public class ParameterizedSingleTypeReference extends ArrayTypeReference {
27
public class ParameterizedSingleTypeReference extends ArrayTypeReference {
28
28
29
	public TypeReference[] typeArguments;
29
	public TypeReference[] typeArguments;
30
	public TypeBinding[] inferredTypeArgs;
30
31
31
	public ParameterizedSingleTypeReference(char[] name, TypeReference[] typeArguments, int dim, long pos){
32
	public ParameterizedSingleTypeReference(char[] name, TypeReference[] typeArguments, int dim, long pos){
32
		super(name, dim, pos);
33
		super(name, dim, pos);
33
		this.originalSourceEnd = this.sourceEnd;
34
		this.originalSourceEnd = this.sourceEnd;
34
		this.typeArguments = typeArguments;
35
		this.typeArguments = typeArguments;
36
		this.inferredTypeArgs = null;
35
	}
37
	}
36
	public void checkBounds(Scope scope) {
38
	public void checkBounds(Scope scope) {
37
		if (this.resolvedType == null) return;
39
		if (this.resolvedType == null) return;
Lines 57-62 Link Here
57
	 * @return char[][]
59
	 * @return char[][]
58
	 */
60
	 */
59
	public char [][] getParameterizedTypeName(){
61
	public char [][] getParameterizedTypeName(){
62
		if ((this.bits & ASTNode.IsDiamond) != 0)
63
			return this.getTypeName();
60
		StringBuffer buffer = new StringBuffer(5);
64
		StringBuffer buffer = new StringBuffer(5);
61
		buffer.append(this.token).append('<');
65
		buffer.append(this.token).append('<');
62
		for (int i = 0, length = this.typeArguments.length; i < length; i++) {
66
		for (int i = 0, length = this.typeArguments.length; i < length; i++) {
Lines 90-95 Link Here
90
     * No need to check for reference to raw type per construction
94
     * No need to check for reference to raw type per construction
91
     */
95
     */
92
	private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
96
	private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
97
		boolean isCompliant17 = scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_7;
93
		// handle the error here
98
		// handle the error here
94
		this.constant = Constant.NotAConstant;
99
		this.constant = Constant.NotAConstant;
95
		if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
100
		if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
Lines 188-193 Link Here
188
			    argTypes[i] = argType;
193
			    argTypes[i] = argType;
189
		     }
194
		     }
190
		}
195
		}
196
		if (argLength == 0 && (this.bits & ASTNode.IsDiamond) != 0 && this.inferredTypeArgs != null) {
197
			argTypes = this.inferredTypeArgs;
198
		}
191
		if (argHasError) {
199
		if (argHasError) {
192
			return null;
200
			return null;
193
		}
201
		}
Lines 222-229 Link Here
222
			}
230
			}
223
			// if missing generic type, and compliance >= 1.5, then will rebuild a parameterized binding
231
			// if missing generic type, and compliance >= 1.5, then will rebuild a parameterized binding
224
		} else if (argLength != typeVariables.length) { // check arity
232
		} else if (argLength != typeVariables.length) { // check arity
225
			scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
233
			if(isCompliant17 && argLength == 0) {
226
			return null;
234
				if ((this.bits & ASTNode.IsDiamond) ==0) {
235
					scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
236
					return null;
237
				}
238
				// argLength = 0 ok if its the diamond case for compliance >= 1.7
239
				// also no need to check bounds for such a case
240
				checkBounds = false;
241
			} else {
242
				scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
243
				return null;
244
			}
227
		} else if (!currentType.isStatic()) {
245
		} else if (!currentType.isStatic()) {
228
			ReferenceBinding actualEnclosing = currentType.enclosingType();
246
			ReferenceBinding actualEnclosing = currentType.enclosingType();
229
			if (actualEnclosing != null && actualEnclosing.isRawType()){
247
			if (actualEnclosing != null && actualEnclosing.isRawType()){
Lines 281-286 Link Here
281
		return output;
299
		return output;
282
	}
300
	}
283
301
302
	public TypeBinding resolveType(BlockScope scope, boolean checkBounds, TypeBinding[] inferredArgs) {
303
		this.inferredTypeArgs = inferredArgs;
304
	    return internalResolveType(scope, null, checkBounds);
305
	}
306
	
284
	public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {
307
	public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {
285
	    return internalResolveType(scope, null, checkBounds);
308
	    return internalResolveType(scope, null, checkBounds);
286
	}
309
	}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java (+5 lines)
Lines 272-277 Link Here
272
				receiverType = scope.enclosingSourceType();
272
				receiverType = scope.enclosingSourceType();
273
			} else {
273
			} else {
274
				receiverType = this.type.resolveType(scope, true /* check bounds*/);
274
				receiverType = this.type.resolveType(scope, true /* check bounds*/);
275
				boolean isCompliant17 = scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_7;
276
				if (isCompliant17 && this.anonymousType != null && (this.type.bits & ASTNode.IsDiamond) != 0) {
277
					scope.problemReporter().invalidUsageOfDiamondConstruct(this.type);
278
					return null;
279
				}
275
				checkParameterizedAllocation: {
280
				checkParameterizedAllocation: {
276
					if (receiverType == null || !receiverType.isValidBinding()) break checkParameterizedAllocation;
281
					if (receiverType == null || !receiverType.isValidBinding()) break checkParameterizedAllocation;
277
					if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
282
					if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java (+5 lines)
Lines 208-213 Link Here
208
	return internalResolveType(scope);
208
	return internalResolveType(scope);
209
}
209
}
210
210
211
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, TypeBinding[] inferredArgs) {
212
	return internalResolveType(scope);
213
}
214
215
211
public TypeBinding resolveType(ClassScope scope) {
216
public TypeBinding resolveType(ClassScope scope) {
212
	return internalResolveType(scope);
217
	return internalResolveType(scope);
213
}
218
}
(-)compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java (+9 lines)
Lines 136-141 Link Here
136
	public static final String OPTION_IncludeNullInfoFromAsserts = "org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts";  //$NON-NLS-1$
136
	public static final String OPTION_IncludeNullInfoFromAsserts = "org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts";  //$NON-NLS-1$
137
	public static final String OPTION_ReportMethodCanBeStatic = "org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic";  //$NON-NLS-1$
137
	public static final String OPTION_ReportMethodCanBeStatic = "org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic";  //$NON-NLS-1$
138
	public static final String OPTION_ReportMethodCanBePotentiallyStatic = "org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic";  //$NON-NLS-1$
138
	public static final String OPTION_ReportMethodCanBePotentiallyStatic = "org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic";  //$NON-NLS-1$
139
	public static final String OPTION_ReportRedundantDeclarationOfTypeArguments =  "org.eclipse.jdt.core.compiler.problem.redundantDeclarationOfTypeArguments"; //$NON-NLS-1$
139
	/**
140
	/**
140
	 * Possible values for configurable options
141
	 * Possible values for configurable options
141
	 */
142
	 */
Lines 238-243 Link Here
238
	public static final int UnusedObjectAllocation = IrritantSet.GROUP2 | ASTNode.Bit4;
239
	public static final int UnusedObjectAllocation = IrritantSet.GROUP2 | ASTNode.Bit4;
239
	public static final int MethodCanBeStatic = IrritantSet.GROUP2 | ASTNode.Bit5;
240
	public static final int MethodCanBeStatic = IrritantSet.GROUP2 | ASTNode.Bit5;
240
	public static final int MethodCanBePotentiallyStatic = IrritantSet.GROUP2 | ASTNode.Bit6;
241
	public static final int MethodCanBePotentiallyStatic = IrritantSet.GROUP2 | ASTNode.Bit6;
242
	public static final int RedundantDeclarationOfTypeArguments = IrritantSet.GROUP2 | ASTNode.Bit7;
241
243
242
	// Severity level for handlers
244
	// Severity level for handlers
243
	/** 
245
	/** 
Lines 547-552 Link Here
547
				return OPTION_ReportMethodCanBeStatic;
549
				return OPTION_ReportMethodCanBeStatic;
548
			case MethodCanBePotentiallyStatic :
550
			case MethodCanBePotentiallyStatic :
549
				return OPTION_ReportMethodCanBePotentiallyStatic;
551
				return OPTION_ReportMethodCanBePotentiallyStatic;
552
			case RedundantDeclarationOfTypeArguments :
553
				return OPTION_ReportRedundantDeclarationOfTypeArguments;
550
		}
554
		}
551
		return null;
555
		return null;
552
	}
556
	}
Lines 680-685 Link Here
680
			OPTION_ReportPossibleAccidentalBooleanAssignment,
684
			OPTION_ReportPossibleAccidentalBooleanAssignment,
681
			OPTION_ReportPotentialNullReference,
685
			OPTION_ReportPotentialNullReference,
682
			OPTION_ReportRawTypeReference,
686
			OPTION_ReportRawTypeReference,
687
			OPTION_ReportRedundantDeclarationOfTypeArguments,
683
			OPTION_ReportRedundantNullCheck,
688
			OPTION_ReportRedundantNullCheck,
684
			OPTION_ReportRedundantSuperinterface,
689
			OPTION_ReportRedundantSuperinterface,
685
			OPTION_ReportSpecialParameterHidingField,
690
			OPTION_ReportSpecialParameterHidingField,
Lines 763-768 Link Here
763
			case UnusedDeclaredThrownException :
768
			case UnusedDeclaredThrownException :
764
			case DeadCode :
769
			case DeadCode :
765
			case UnusedObjectAllocation :
770
			case UnusedObjectAllocation :
771
			case RedundantDeclarationOfTypeArguments :
766
				return "unused"; //$NON-NLS-1$
772
				return "unused"; //$NON-NLS-1$
767
			case DiscouragedReference :
773
			case DiscouragedReference :
768
			case ForbiddenReference :
774
			case ForbiddenReference :
Lines 973-978 Link Here
973
		optionsMap.put(OPTION_IncludeNullInfoFromAsserts, this.includeNullInfoFromAsserts ? ENABLED : DISABLED);
979
		optionsMap.put(OPTION_IncludeNullInfoFromAsserts, this.includeNullInfoFromAsserts ? ENABLED : DISABLED);
974
		optionsMap.put(OPTION_ReportMethodCanBeStatic, getSeverityString(MethodCanBeStatic));
980
		optionsMap.put(OPTION_ReportMethodCanBeStatic, getSeverityString(MethodCanBeStatic));
975
		optionsMap.put(OPTION_ReportMethodCanBePotentiallyStatic, getSeverityString(MethodCanBePotentiallyStatic));
981
		optionsMap.put(OPTION_ReportMethodCanBePotentiallyStatic, getSeverityString(MethodCanBePotentiallyStatic));
982
		optionsMap.put(OPTION_ReportRedundantDeclarationOfTypeArguments, getSeverityString(RedundantDeclarationOfTypeArguments));
976
		return optionsMap;
983
		return optionsMap;
977
	}
984
	}
978
985
Lines 1402-1407 Link Here
1402
		if ((optionValue = optionsMap.get(OPTION_ReportUnusedObjectAllocation)) != null) updateSeverity(UnusedObjectAllocation, optionValue);
1409
		if ((optionValue = optionsMap.get(OPTION_ReportUnusedObjectAllocation)) != null) updateSeverity(UnusedObjectAllocation, optionValue);
1403
		if ((optionValue = optionsMap.get(OPTION_ReportMethodCanBeStatic)) != null) updateSeverity(MethodCanBeStatic, optionValue);
1410
		if ((optionValue = optionsMap.get(OPTION_ReportMethodCanBeStatic)) != null) updateSeverity(MethodCanBeStatic, optionValue);
1404
		if ((optionValue = optionsMap.get(OPTION_ReportMethodCanBePotentiallyStatic)) != null) updateSeverity(MethodCanBePotentiallyStatic, optionValue);
1411
		if ((optionValue = optionsMap.get(OPTION_ReportMethodCanBePotentiallyStatic)) != null) updateSeverity(MethodCanBePotentiallyStatic, optionValue);
1412
		if ((optionValue = optionsMap.get(OPTION_ReportRedundantDeclarationOfTypeArguments)) != null) updateSeverity(RedundantDeclarationOfTypeArguments, optionValue);
1405
1413
1406
		// Javadoc options
1414
		// Javadoc options
1407
		if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) {
1415
		if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) {
Lines 1616-1621 Link Here
1616
		buf.append("\n\t- unused object allocation: ").append(getSeverityString(UnusedObjectAllocation)); //$NON-NLS-1$
1624
		buf.append("\n\t- unused object allocation: ").append(getSeverityString(UnusedObjectAllocation)); //$NON-NLS-1$
1617
		buf.append("\n\t- method can be static: ").append(getSeverityString(MethodCanBeStatic)); //$NON-NLS-1$
1625
		buf.append("\n\t- method can be static: ").append(getSeverityString(MethodCanBeStatic)); //$NON-NLS-1$
1618
		buf.append("\n\t- method can be potentially static: ").append(getSeverityString(MethodCanBePotentiallyStatic)); //$NON-NLS-1$
1626
		buf.append("\n\t- method can be potentially static: ").append(getSeverityString(MethodCanBePotentiallyStatic)); //$NON-NLS-1$
1627
		buf.append("\n\t- redundant declaration of type arguments: ").append(getSeverityString(RedundantDeclarationOfTypeArguments)); //$NON-NLS-1$
1619
		return buf.toString();
1628
		return buf.toString();
1620
	}
1629
	}
1621
	
1630
	
(-)compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java (-1 / +2 lines)
Lines 120-126 Link Here
120
			.set(CompilerOptions.UnusedTypeArguments)
120
			.set(CompilerOptions.UnusedTypeArguments)
121
			.set(CompilerOptions.RedundantSuperinterface)
121
			.set(CompilerOptions.RedundantSuperinterface)
122
			.set(CompilerOptions.DeadCode)
122
			.set(CompilerOptions.DeadCode)
123
			.set(CompilerOptions.UnusedObjectAllocation);
123
			.set(CompilerOptions.UnusedObjectAllocation)
124
			.set(CompilerOptions.RedundantDeclarationOfTypeArguments);
124
		STATIC_METHOD
125
		STATIC_METHOD
125
		    .set(CompilerOptions.MethodCanBePotentiallyStatic);
126
		    .set(CompilerOptions.MethodCanBePotentiallyStatic);
126
		String suppressRawWhenUnchecked = System.getProperty("suppressRawWhenUnchecked"); //$NON-NLS-1$
127
		String suppressRawWhenUnchecked = System.getProperty("suppressRawWhenUnchecked"); //$NON-NLS-1$
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java (+12 lines)
Lines 1005-1010 Link Here
1005
 * In addition to improving performance, caching also ensures there is no infinite regression
1005
 * In addition to improving performance, caching also ensures there is no infinite regression
1006
 * since per nature, the compatibility check is recursive through parameterized type arguments (122775)
1006
 * since per nature, the compatibility check is recursive through parameterized type arguments (122775)
1007
 */
1007
 */
1008
public boolean isCompatibleWith(TypeBinding otherType, boolean isDiamondCase) {
1009
	if (isDiamondCase) {
1010
		if (this.erasure() == otherType.erasure())
1011
			return true;
1012
	}
1013
	return isCompatibleWith(otherType);
1014
}
1015
/**
1016
 * Answer true if the receiver type can be assigned to the argument type (right)
1017
 * In addition to improving performance, caching also ensures there is no infinite regression
1018
 * since per nature, the compatibility check is recursive through parameterized type arguments (122775)
1019
 */
1008
public boolean isCompatibleWith(TypeBinding otherType) {
1020
public boolean isCompatibleWith(TypeBinding otherType) {
1009
	if (otherType == this)
1021
	if (otherType == this)
1010
		return true;
1022
		return true;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java (-1 / +11 lines)
Lines 1310-1315 Link Here
1310
					fieldDecl.binding = null;
1310
					fieldDecl.binding = null;
1311
					return null;
1311
					return null;
1312
				}
1312
				}
1313
				if ((this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7) && ((fieldDecl.type.bits & ASTNode.IsDiamond) != 0)) {
1314
					this.scope.problemReporter().incorrectArityForParameterizedType(fieldDecl.type, fieldType, Binding.NO_TYPES);
1315
					fieldDecl.binding = null;
1316
					return null;
1317
				}
1313
				if (fieldType == TypeBinding.VOID) {
1318
				if (fieldType == TypeBinding.VOID) {
1314
					this.scope.problemReporter().variableTypeCannotBeVoid(fieldDecl);
1319
					this.scope.problemReporter().variableTypeCannotBeVoid(fieldDecl);
1315
					fieldDecl.binding = null;
1320
					fieldDecl.binding = null;
Lines 1390-1395 Link Here
1390
	final boolean reportUnavoidableGenericTypeProblems = this.scope.compilerOptions().reportUnavoidableGenericTypeProblems;
1395
	final boolean reportUnavoidableGenericTypeProblems = this.scope.compilerOptions().reportUnavoidableGenericTypeProblems;
1391
	boolean foundArgProblem = false;
1396
	boolean foundArgProblem = false;
1392
	Argument[] arguments = methodDecl.arguments;
1397
	Argument[] arguments = methodDecl.arguments;
1398
	boolean isCompliant17 = this.scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_7;
1393
	if (arguments != null) {
1399
	if (arguments != null) {
1394
		int size = arguments.length;
1400
		int size = arguments.length;
1395
		method.parameters = Binding.NO_PARAMETERS;
1401
		method.parameters = Binding.NO_PARAMETERS;
Lines 1415-1420 Link Here
1415
		
1421
		
1416
			if (parameterType == null) {
1422
			if (parameterType == null) {
1417
				foundArgProblem = true;
1423
				foundArgProblem = true;
1424
			} else if (isCompliant17 && (arg.type.bits & ASTNode.IsDiamond) != 0) {
1425
				// a parameter type cannot use diamond construct
1426
				methodDecl.scope.problemReporter().incorrectArityForParameterizedType(arg.type, parameterType.original(), Binding.NO_TYPES);
1427
				foundArgProblem = true;
1418
			} else if (parameterType == TypeBinding.VOID) {
1428
			} else if (parameterType == TypeBinding.VOID) {
1419
				methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(this, methodDecl, arg);
1429
				methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(this, methodDecl, arg);
1420
				foundArgProblem = true;
1430
				foundArgProblem = true;
Lines 1436-1442 Link Here
1436
	}
1446
	}
1437
1447
1438
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=337799
1448
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=337799
1439
	if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7) {
1449
	if (isCompliant17) {
1440
		if ((method.tagBits & TagBits.AnnotationSafeVarargs) != 0) {
1450
		if ((method.tagBits & TagBits.AnnotationSafeVarargs) != 0) {
1441
			if (!method.isVarargs()) {
1451
			if (!method.isVarargs()) {
1442
				methodDecl.scope.problemReporter().safeVarargsOnFixedArityMethod(method);
1452
				methodDecl.scope.problemReporter().safeVarargsOnFixedArityMethod(method);
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 1183-1186 Link Here
1183
public TypeVariableBinding[] typeVariables() {
1183
public TypeVariableBinding[] typeVariables() {
1184
	return Binding.NO_TYPE_VARIABLES;
1184
	return Binding.NO_TYPE_VARIABLES;
1185
}
1185
}
1186
1187
public boolean isCompatibleWith(TypeBinding variableType, boolean isDiamond){
1188
	return isCompatibleWith(variableType);
1189
}
1186
}
1190
}
(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (-1 / +3 lines)
Lines 3956-3961 Link Here
3956
	// zero type arguments == <>
3956
	// zero type arguments == <>
3957
	pushOnGenericsLengthStack(-1);
3957
	pushOnGenericsLengthStack(-1);
3958
	concatGenericsLists();
3958
	concatGenericsLists();
3959
	this.intPtr--;	// no reference type to be consumed between < and >
3959
}
3960
}
3960
protected void consumeImportDeclaration() {
3961
protected void consumeImportDeclaration() {
3961
	// SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName ';'
3962
	// SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName ';'
Lines 8915-8921 Link Here
8915
			parameterizedSingleTypeReference.sourceEnd = this.endStatementPosition;
8916
			parameterizedSingleTypeReference.sourceEnd = this.endStatementPosition;
8916
		}
8917
		}
8917
		if (isDiamond) {
8918
		if (isDiamond) {
8918
			parameterizedSingleTypeReference.bits |= ASTNode.IsDiamond;
8919
			if (parameterizedSingleTypeReference.dimensions == 0)
8920
				parameterizedSingleTypeReference.bits |= ASTNode.IsDiamond;
8919
		}
8921
		}
8920
		return parameterizedSingleTypeReference;
8922
		return parameterizedSingleTypeReference;
8921
	} else {
8923
	} else {
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+25 lines)
Lines 430-435 Link Here
430
			
430
			
431
		case IProblem.MethodCanBePotentiallyStatic:
431
		case IProblem.MethodCanBePotentiallyStatic:
432
			return CompilerOptions.MethodCanBePotentiallyStatic;
432
			return CompilerOptions.MethodCanBePotentiallyStatic;
433
			
434
		case IProblem.RedundantDeclarationOfTypeArguments:
435
			return CompilerOptions.RedundantDeclarationOfTypeArguments;
433
	}
436
	}
434
	return 0;
437
	return 0;
435
}
438
}
Lines 503-508 Link Here
503
			case CompilerOptions.UnusedWarningToken :
506
			case CompilerOptions.UnusedWarningToken :
504
			case CompilerOptions.UnusedLabel :
507
			case CompilerOptions.UnusedLabel :
505
			case CompilerOptions.RedundantSuperinterface :	
508
			case CompilerOptions.RedundantSuperinterface :	
509
			case CompilerOptions.RedundantDeclarationOfTypeArguments :
506
				return CategorizedProblem.CAT_UNNECESSARY_CODE;
510
				return CategorizedProblem.CAT_UNNECESSARY_CODE;
507
511
508
			case CompilerOptions.UsingDeprecatedAPI :
512
			case CompilerOptions.UsingDeprecatedAPI :
Lines 3877-3882 Link Here
3877
		annotationTypeDeclaration.sourceStart,
3881
		annotationTypeDeclaration.sourceStart,
3878
		annotationTypeDeclaration.sourceEnd);
3882
		annotationTypeDeclaration.sourceEnd);
3879
}
3883
}
3884
public void invalidUsageOfDiamondConstruct(ASTNode typeRef) {
3885
	//int i = 1;
3886
	this.handle(
3887
		IProblem.InvalidUsageOfDiamondConstruct,
3888
		NoArgument,
3889
		NoArgument,
3890
		typeRef.sourceStart,
3891
		typeRef.sourceEnd);
3892
}
3880
public void invalidUsageOfEnumDeclarations(TypeDeclaration enumDeclaration) {
3893
public void invalidUsageOfEnumDeclarations(TypeDeclaration enumDeclaration) {
3881
	this.handle(
3894
	this.handle(
3882
		IProblem.InvalidUsageOfEnumDeclarations,
3895
		IProblem.InvalidUsageOfEnumDeclarations,
Lines 6177-6182 Link Here
6177
		localDecl.sourceStart,
6190
		localDecl.sourceStart,
6178
		localDecl.sourceEnd);
6191
		localDecl.sourceEnd);
6179
}
6192
}
6193
public void redundantDeclarationOfTypeArguments(ASTNode location, TypeBinding[] argumentTypes) {
6194
	int severity = computeSeverity(IProblem.RedundantDeclarationOfTypeArguments);
6195
    if (severity != ProblemSeverities.Ignore) {
6196
		this.handle(
6197
			IProblem.RedundantDeclarationOfTypeArguments,
6198
			new String[] {typesAsString(false, argumentTypes, false)},
6199
			new String[] {typesAsString(false, argumentTypes, true)},
6200
			severity,
6201
			location.sourceStart,
6202
			nodeSourceEnd(null, location));
6203
    }
6204
}
6180
public void redundantSuperInterface(SourceTypeBinding type, TypeReference reference, ReferenceBinding superinterface, ReferenceBinding declaringType) {
6205
public void redundantSuperInterface(SourceTypeBinding type, TypeReference reference, ReferenceBinding superinterface, ReferenceBinding declaringType) {
6181
	int severity = computeSeverity(IProblem.RedundantSuperinterface);
6206
	int severity = computeSeverity(IProblem.RedundantSuperinterface);
6182
	if (severity != ProblemSeverities.Ignore) {
6207
	if (severity != ProblemSeverities.Ignore) {
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+2 lines)
Lines 638-643 Link Here
638
874 = Resource specification not allowed here for source level below 1.7
638
874 = Resource specification not allowed here for source level below 1.7
639
875 = Multi-catch parameters are not allowed for source level below 1.7
639
875 = Multi-catch parameters are not allowed for source level below 1.7
640
876 = Invocation of polymorphic methods not allowed for source level below 1.7
640
876 = Invocation of polymorphic methods not allowed for source level below 1.7
641
877 = Empty type argument list cannot be used in anonymous class declaration
642
878 = Redundant declaration of type arguments <{0}>
641
643
642
### ELABORATIONS
644
### ELABORATIONS
643
## Access restrictions
645
## Access restrictions
(-)model/org/eclipse/jdt/core/JavaCore.java (-1 / +15 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 1619-1624 Link Here
1619
	 */
1619
	 */
1620
	public static final String COMPILER_PB_REDUNDANT_SUPERINTERFACE = PLUGIN_ID + ".compiler.problem.redundantSuperinterface"; //$NON-NLS-1$
1620
	public static final String COMPILER_PB_REDUNDANT_SUPERINTERFACE = PLUGIN_ID + ".compiler.problem.redundantSuperinterface"; //$NON-NLS-1$
1621
	/**
1621
	/**
1622
	 * Compiler option ID: Reporting Redundant Declaration of Type Arguments.
1623
	 * <p>When enabled, the compiler will issue an error or a warning if type arguments are specified
1624
	 *    in a class instantiation expression where the diamond semantics "<>" are sufficient for the 
1625
	 *    compiler to infer the type arguments.
1626
	 * <dl>
1627
	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.redundantDeclarationOfTypeArguments"</code></dd>
1628
	 * <dt>Possible values:</dt><dd><code>{ "error", "warning", "ignore" }</code></dd>
1629
	 * <dt>Default:</dt><dd><code>"warning"</code></dd>
1630
	 * </dl>
1631
	 * @since 3.7
1632
	 * @category CompilerOptionID
1633
	 */
1634
	public static final String COMPILER_PB_REDUNDANT_DECLARATION_OF_TYPE_ARGS = PLUGIN_ID + ".compiler.problem.redundantDeclarationOfTypeArguments"; //$NON-NLS-1$
1635
	/**
1622
	 * Compiler option ID: Reporting Comparison of Identical Expressions.
1636
	 * Compiler option ID: Reporting Comparison of Identical Expressions.
1623
	 * <p>When enabled, the compiler will issue an error or a warning if a comparison
1637
	 * <p>When enabled, the compiler will issue an error or a warning if a comparison
1624
	 * is involving identical operands (e.g <code>'x == x'</code>).
1638
	 * is involving identical operands (e.g <code>'x == x'</code>).
(-)src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java (-136 / +137 lines)
Lines 1781-1922 Link Here
1781
				true);
1781
				true);
1782
		String logContents = Util.fileContent(logFileName);
1782
		String logContents = Util.fileContent(logFileName);
1783
		String expectedLogContents =
1783
		String expectedLogContents =
1784
			"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + 
1784
				"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + 
1785
			"<!DOCTYPE compiler PUBLIC \"-//Eclipse.org//DTD Eclipse JDT 3.2.004 Compiler//EN\" \"http://www.eclipse.org/jdt/core/compiler_32_004.dtd\">\n" + 
1785
				"<!DOCTYPE compiler PUBLIC \"-//Eclipse.org//DTD Eclipse JDT 3.2.004 Compiler//EN\" \"http://www.eclipse.org/jdt/core/compiler_32_004.dtd\">\n" + 
1786
			"<compiler copyright=\"{2}\" name=\"{1}\" version=\"{3}\">\n" + 
1786
				"<compiler copyright=\"{2}\" name=\"{1}\" version=\"{3}\">\n" + 
1787
			"	<command_line>\n" + 
1787
				"	<command_line>\n" + 
1788
			"		<argument value=\"---OUTPUT_DIR_PLACEHOLDER---{0}X.java\"/>\n" + 
1788
				"		<argument value=\"---OUTPUT_DIR_PLACEHOLDER---{0}X.java\"/>\n" + 
1789
			"		<argument value=\"-1.5\"/>\n" + 
1789
				"		<argument value=\"-1.5\"/>\n" + 
1790
			"		<argument value=\"-proceedOnError\"/>\n" + 
1790
				"		<argument value=\"-proceedOnError\"/>\n" + 
1791
			"		<argument value=\"-log\"/>\n" + 
1791
				"		<argument value=\"-log\"/>\n" + 
1792
			"		<argument value=\"---OUTPUT_DIR_PLACEHOLDER---{0}log.xml\"/>\n" + 
1792
				"		<argument value=\"---OUTPUT_DIR_PLACEHOLDER---{0}log.xml\"/>\n" + 
1793
			"		<argument value=\"-d\"/>\n" + 
1793
				"		<argument value=\"-d\"/>\n" + 
1794
			"		<argument value=\"---OUTPUT_DIR_PLACEHOLDER---\"/>\n" + 
1794
				"		<argument value=\"---OUTPUT_DIR_PLACEHOLDER---\"/>\n" + 
1795
			"	</command_line>\n" + 
1795
				"	</command_line>\n" + 
1796
			"	<options>\n" + 
1796
				"	<options>\n" + 
1797
			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode\" value=\"disabled\"/>\n" + 
1797
				"		<option key=\"org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode\" value=\"disabled\"/>\n" + 
1798
			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.targetPlatform\" value=\"1.5\"/>\n" + 
1798
				"		<option key=\"org.eclipse.jdt.core.compiler.codegen.targetPlatform\" value=\"1.5\"/>\n" + 
1799
			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.unusedLocal\" value=\"optimize out\"/>\n" + 
1799
				"		<option key=\"org.eclipse.jdt.core.compiler.codegen.unusedLocal\" value=\"optimize out\"/>\n" + 
1800
			"		<option key=\"org.eclipse.jdt.core.compiler.compliance\" value=\"1.5\"/>\n" + 
1800
				"		<option key=\"org.eclipse.jdt.core.compiler.compliance\" value=\"1.5\"/>\n" + 
1801
			"		<option key=\"org.eclipse.jdt.core.compiler.debug.lineNumber\" value=\"generate\"/>\n" + 
1801
				"		<option key=\"org.eclipse.jdt.core.compiler.debug.lineNumber\" value=\"generate\"/>\n" + 
1802
			"		<option key=\"org.eclipse.jdt.core.compiler.debug.localVariable\" value=\"do not generate\"/>\n" + 
1802
				"		<option key=\"org.eclipse.jdt.core.compiler.debug.localVariable\" value=\"do not generate\"/>\n" + 
1803
			"		<option key=\"org.eclipse.jdt.core.compiler.debug.sourceFile\" value=\"generate\"/>\n" + 
1803
				"		<option key=\"org.eclipse.jdt.core.compiler.debug.sourceFile\" value=\"generate\"/>\n" + 
1804
			"		<option key=\"org.eclipse.jdt.core.compiler.doc.comment.support\" value=\"disabled\"/>\n" + 
1804
				"		<option key=\"org.eclipse.jdt.core.compiler.doc.comment.support\" value=\"disabled\"/>\n" + 
1805
			"		<option key=\"org.eclipse.jdt.core.compiler.generateClassFiles\" value=\"enabled\"/>\n" + 
1805
				"		<option key=\"org.eclipse.jdt.core.compiler.generateClassFiles\" value=\"enabled\"/>\n" + 
1806
			"		<option key=\"org.eclipse.jdt.core.compiler.maxProblemPerUnit\" value=\"100\"/>\n" +
1806
				"		<option key=\"org.eclipse.jdt.core.compiler.maxProblemPerUnit\" value=\"100\"/>\n" + 
1807
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.annotationSuperInterface\" value=\"warning\"/>\n" + 
1807
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.annotationSuperInterface\" value=\"warning\"/>\n" + 
1808
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.assertIdentifier\" value=\"warning\"/>\n" + 
1808
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.assertIdentifier\" value=\"warning\"/>\n" + 
1809
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.autoboxing\" value=\"ignore\"/>\n" + 
1809
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.autoboxing\" value=\"ignore\"/>\n" + 
1810
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.comparingIdentical\" value=\"warning\"/>\n" + 
1810
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.comparingIdentical\" value=\"warning\"/>\n" + 
1811
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.deadCode\" value=\"warning\"/>\n" + 
1811
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.deadCode\" value=\"warning\"/>\n" + 
1812
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement\" value=\"disabled\"/>\n" + 
1812
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement\" value=\"disabled\"/>\n" + 
1813
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.deprecation\" value=\"warning\"/>\n" + 
1813
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.deprecation\" value=\"warning\"/>\n" + 
1814
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode\" value=\"disabled\"/>\n" + 
1814
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode\" value=\"disabled\"/>\n" + 
1815
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod\" value=\"disabled\"/>\n" + 
1815
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod\" value=\"disabled\"/>\n" + 
1816
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.discouragedReference\" value=\"warning\"/>\n" + 
1816
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.discouragedReference\" value=\"warning\"/>\n" + 
1817
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.emptyStatement\" value=\"ignore\"/>\n" + 
1817
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.emptyStatement\" value=\"ignore\"/>\n" + 
1818
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.enumIdentifier\" value=\"warning\"/>\n" + 
1818
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.enumIdentifier\" value=\"warning\"/>\n" + 
1819
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.fallthroughCase\" value=\"ignore\"/>\n" + 
1819
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.fallthroughCase\" value=\"ignore\"/>\n" + 
1820
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.fatalOptionalError\" value=\"disabled\"/>\n" + 
1820
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.fatalOptionalError\" value=\"disabled\"/>\n" + 
1821
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.fieldHiding\" value=\"ignore\"/>\n" + 
1821
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.fieldHiding\" value=\"ignore\"/>\n" + 
1822
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.finalParameterBound\" value=\"warning\"/>\n" + 
1822
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.finalParameterBound\" value=\"warning\"/>\n" + 
1823
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally\" value=\"warning\"/>\n" + 
1823
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally\" value=\"warning\"/>\n" + 
1824
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.forbiddenReference\" value=\"warning\"/>\n" + 
1824
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.forbiddenReference\" value=\"warning\"/>\n" + 
1825
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock\" value=\"warning\"/>\n" + 
1825
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock\" value=\"warning\"/>\n" + 
1826
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts\" value=\"disabled\"/>\n" + 
1826
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts\" value=\"disabled\"/>\n" + 
1827
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod\" value=\"warning\"/>\n" + 
1827
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod\" value=\"warning\"/>\n" + 
1828
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch\" value=\"ignore\"/>\n" + 
1828
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch\" value=\"ignore\"/>\n" + 
1829
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.indirectStaticAccess\" value=\"ignore\"/>\n" + 
1829
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.indirectStaticAccess\" value=\"ignore\"/>\n" + 
1830
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadoc\" value=\"ignore\"/>\n" + 
1830
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadoc\" value=\"ignore\"/>\n" + 
1831
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTags\" value=\"disabled\"/>\n" + 
1831
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTags\" value=\"disabled\"/>\n" + 
1832
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef\" value=\"disabled\"/>\n" + 
1832
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef\" value=\"disabled\"/>\n" + 
1833
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef\" value=\"disabled\"/>\n" + 
1833
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef\" value=\"disabled\"/>\n" + 
1834
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility\" value=\"public\"/>\n" + 
1834
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility\" value=\"public\"/>\n" + 
1835
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.localVariableHiding\" value=\"ignore\"/>\n" + 
1835
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.localVariableHiding\" value=\"ignore\"/>\n" + 
1836
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.methodWithConstructorName\" value=\"warning\"/>\n" + 
1836
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.methodWithConstructorName\" value=\"warning\"/>\n" + 
1837
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation\" value=\"ignore\"/>\n" + 
1837
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation\" value=\"ignore\"/>\n" + 
1838
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod\" value=\"ignore\"/>\n" + 
1838
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod\" value=\"ignore\"/>\n" + 
1839
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocComments\" value=\"ignore\"/>\n" + 
1839
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocComments\" value=\"ignore\"/>\n" + 
1840
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding\" value=\"disabled\"/>\n" + 
1840
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding\" value=\"disabled\"/>\n" + 
1841
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility\" value=\"public\"/>\n" + 
1841
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility\" value=\"public\"/>\n" + 
1842
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription\" value=\"return_tag\"/>\n" + 
1842
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription\" value=\"return_tag\"/>\n" + 
1843
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTags\" value=\"ignore\"/>\n" + 
1843
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTags\" value=\"ignore\"/>\n" + 
1844
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters\" value=\"disabled\"/>\n" + 
1844
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters\" value=\"disabled\"/>\n" + 
1845
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding\" value=\"disabled\"/>\n" + 
1845
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding\" value=\"disabled\"/>\n" + 
1846
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility\" value=\"public\"/>\n" + 
1846
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility\" value=\"public\"/>\n" + 
1847
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation\" value=\"ignore\"/>\n" + 
1847
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation\" value=\"ignore\"/>\n" + 
1848
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation\" value=\"enabled\"/>\n" + 
1848
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation\" value=\"enabled\"/>\n" + 
1849
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingSerialVersion\" value=\"warning\"/>\n" + 
1849
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingSerialVersion\" value=\"warning\"/>\n" + 
1850
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod\" value=\"ignore\"/>\n" + 
1850
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod\" value=\"ignore\"/>\n" + 
1851
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.noEffectAssignment\" value=\"warning\"/>\n" + 
1851
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.noEffectAssignment\" value=\"warning\"/>\n" + 
1852
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion\" value=\"warning\"/>\n" + 
1852
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion\" value=\"warning\"/>\n" + 
1853
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral\" value=\"ignore\"/>\n" + 
1853
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral\" value=\"ignore\"/>\n" + 
1854
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.nullReference\" value=\"warning\"/>\n" + 
1854
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.nullReference\" value=\"warning\"/>\n" + 
1855
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation\" value=\"ignore\"/>\n" + 
1855
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation\" value=\"ignore\"/>\n" + 
1856
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod\" value=\"warning\"/>\n" + 
1856
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod\" value=\"warning\"/>\n" + 
1857
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.parameterAssignment\" value=\"ignore\"/>\n" + 
1857
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.parameterAssignment\" value=\"ignore\"/>\n" + 
1858
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment\" value=\"ignore\"/>\n" + 
1858
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment\" value=\"ignore\"/>\n" + 
1859
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.potentialNullReference\" value=\"ignore\"/>\n" + 
1859
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.potentialNullReference\" value=\"ignore\"/>\n" + 
1860
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.rawTypeReference\" value=\"warning\"/>\n" + 
1860
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.rawTypeReference\" value=\"warning\"/>\n" + 
1861
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.redundantNullCheck\" value=\"ignore\"/>\n" + 
1861
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.redundantDeclarationOfTypeArguments\" value=\"ignore\"/>\n" + 
1862
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.redundantSuperinterface\" value=\"ignore\"/>\n" + 
1862
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.redundantNullCheck\" value=\"ignore\"/>\n" + 
1863
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic\" value=\"ignore\"/>\n" + 
1863
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.redundantSuperinterface\" value=\"ignore\"/>\n" + 
1864
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic\" value=\"ignore\"/>\n" + 
1864
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic\" value=\"ignore\"/>\n" + 
1865
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.specialParameterHidingField\" value=\"disabled\"/>\n" + 
1865
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic\" value=\"ignore\"/>\n" + 
1866
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.staticAccessReceiver\" value=\"warning\"/>\n" + 
1866
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.specialParameterHidingField\" value=\"disabled\"/>\n" + 
1867
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors\" value=\"disabled\"/>\n" + 
1867
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.staticAccessReceiver\" value=\"warning\"/>\n" + 
1868
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.suppressWarnings\" value=\"enabled\"/>\n" + 
1868
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors\" value=\"disabled\"/>\n" + 
1869
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation\" value=\"ignore\"/>\n" + 
1869
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.suppressWarnings\" value=\"enabled\"/>\n" + 
1870
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.tasks\" value=\"warning\"/>\n" + 
1870
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation\" value=\"ignore\"/>\n" + 
1871
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.typeParameterHiding\" value=\"warning\"/>\n" + 
1871
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.tasks\" value=\"warning\"/>\n" + 
1872
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems\" value=\"enabled\"/>\n" +
1872
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.typeParameterHiding\" value=\"warning\"/>\n" + 
1873
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation\" value=\"warning\"/>\n" + 
1873
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems\" value=\"enabled\"/>\n" + 
1874
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock\" value=\"ignore\"/>\n" + 
1874
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation\" value=\"warning\"/>\n" + 
1875
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unhandledWarningToken\" value=\"warning\"/>\n" + 
1875
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock\" value=\"ignore\"/>\n" + 
1876
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unnecessaryElse\" value=\"ignore\"/>\n" + 
1876
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unhandledWarningToken\" value=\"warning\"/>\n" + 
1877
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck\" value=\"ignore\"/>\n" + 
1877
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unnecessaryElse\" value=\"ignore\"/>\n" + 
1878
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess\" value=\"ignore\"/>\n" + 
1878
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck\" value=\"ignore\"/>\n" + 
1879
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException\" value=\"ignore\"/>\n" + 
1879
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess\" value=\"ignore\"/>\n" + 
1880
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable\" value=\"enabled\"/>\n" + 
1880
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException\" value=\"ignore\"/>\n" + 
1881
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference\" value=\"enabled\"/>\n" + 
1881
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable\" value=\"enabled\"/>\n" + 
1882
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding\" value=\"disabled\"/>\n" + 
1882
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference\" value=\"enabled\"/>\n" + 
1883
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedImport\" value=\"warning\"/>\n" + 
1883
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding\" value=\"disabled\"/>\n" + 
1884
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedLabel\" value=\"warning\"/>\n" + 
1884
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedImport\" value=\"warning\"/>\n" + 
1885
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedLocal\" value=\"warning\"/>\n" + 
1885
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedLabel\" value=\"warning\"/>\n" + 
1886
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation\" value=\"ignore\"/>\n" + 
1886
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedLocal\" value=\"warning\"/>\n" + 
1887
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameter\" value=\"ignore\"/>\n" + 
1887
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation\" value=\"ignore\"/>\n" + 
1888
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference\" value=\"enabled\"/>\n" + 
1888
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameter\" value=\"ignore\"/>\n" + 
1889
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract\" value=\"disabled\"/>\n" + 
1889
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference\" value=\"enabled\"/>\n" + 
1890
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete\" value=\"disabled\"/>\n" + 
1890
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract\" value=\"disabled\"/>\n" + 
1891
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedPrivateMember\" value=\"warning\"/>\n" + 
1891
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete\" value=\"disabled\"/>\n" + 
1892
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation\" value=\"warning\"/>\n" + 
1892
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedPrivateMember\" value=\"warning\"/>\n" + 
1893
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedWarningToken\" value=\"warning\"/>\n" + 
1893
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation\" value=\"warning\"/>\n" + 
1894
			"		<option key=\"org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast\" value=\"warning\"/>\n" + 
1894
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedWarningToken\" value=\"warning\"/>\n" + 
1895
			"		<option key=\"org.eclipse.jdt.core.compiler.processAnnotations\" value=\"disabled\"/>\n" + 
1895
				"		<option key=\"org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast\" value=\"warning\"/>\n" + 
1896
			"		<option key=\"org.eclipse.jdt.core.compiler.source\" value=\"1.5\"/>\n" + 
1896
				"		<option key=\"org.eclipse.jdt.core.compiler.processAnnotations\" value=\"disabled\"/>\n" + 
1897
			"		<option key=\"org.eclipse.jdt.core.compiler.taskCaseSensitive\" value=\"enabled\"/>\n" + 
1897
				"		<option key=\"org.eclipse.jdt.core.compiler.source\" value=\"1.5\"/>\n" + 
1898
			"		<option key=\"org.eclipse.jdt.core.compiler.taskPriorities\" value=\"\"/>\n" + 
1898
				"		<option key=\"org.eclipse.jdt.core.compiler.taskCaseSensitive\" value=\"enabled\"/>\n" + 
1899
			"		<option key=\"org.eclipse.jdt.core.compiler.taskTags\" value=\"\"/>\n" + 
1899
				"		<option key=\"org.eclipse.jdt.core.compiler.taskPriorities\" value=\"\"/>\n" + 
1900
			"	</options>\n" + 
1900
				"		<option key=\"org.eclipse.jdt.core.compiler.taskTags\" value=\"\"/>\n" + 
1901
			"	<classpaths>NORMALIZED SECTION</classpaths>\n" + 
1901
				"	</options>\n" + 
1902
			"	<sources>\n" + 
1902
				"	<classpaths>NORMALIZED SECTION</classpaths>\n" + 
1903
			"		<source output=\"---OUTPUT_DIR_PLACEHOLDER---\" path=\"---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\">\n" + 
1903
				"	<sources>\n" + 
1904
			"			<problems errors=\"1\" problems=\"1\" warnings=\"0\">\n" + 
1904
				"		<source output=\"---OUTPUT_DIR_PLACEHOLDER---\" path=\"---OUTPUT_DIR_PLACEHOLDER---\\X.java\">\n" + 
1905
			"				<problem categoryID=\"40\" charEnd=\"28\" charStart=\"25\" id=\"UndefinedType\" line=\"3\" problemID=\"16777218\" severity=\"ERROR\">\n" + 
1905
				"			<problems errors=\"1\" problems=\"1\" warnings=\"0\">\n" + 
1906
			"					<message value=\"Zork cannot be resolved to a type\"/>\n" + 
1906
				"				<problem categoryID=\"40\" charEnd=\"28\" charStart=\"25\" id=\"UndefinedType\" line=\"3\" problemID=\"16777218\" severity=\"ERROR\">\n" + 
1907
			"					<source_context sourceEnd=\"3\" sourceStart=\"0\" value=\"Zork z;\"/>\n" + 
1907
				"					<message value=\"Zork cannot be resolved to a type\"/>\n" + 
1908
			"					<arguments>\n" + 
1908
				"					<source_context sourceEnd=\"3\" sourceStart=\"0\" value=\"Zork z;\"/>\n" + 
1909
			"						<argument value=\"Zork\"/>\n" + 
1909
				"					<arguments>\n" + 
1910
			"					</arguments>\n" + 
1910
				"						<argument value=\"Zork\"/>\n" + 
1911
			"				</problem>\n" + 
1911
				"					</arguments>\n" + 
1912
			"			</problems>\n" + 
1912
				"				</problem>\n" + 
1913
			"			<classfile path=\"---OUTPUT_DIR_PLACEHOLDER---{0}X.class\"/>\n" + 
1913
				"			</problems>\n" + 
1914
			"		</source>\n" + 
1914
				"			<classfile path=\"---OUTPUT_DIR_PLACEHOLDER---\\X.class\"/>\n" + 
1915
			"	</sources>\n" + 
1915
				"		</source>\n" + 
1916
			"	<stats>\n" + 
1916
				"	</sources>\n" + 
1917
			"		<problem_summary errors=\"1\" problems=\"1\" tasks=\"0\" warnings=\"0\"/>\n" + 
1917
				"	<stats>\n" + 
1918
			"	</stats>\n" + 
1918
				"		<problem_summary errors=\"1\" problems=\"1\" tasks=\"0\" warnings=\"0\"/>\n" + 
1919
			"</compiler>\n";
1919
				"	</stats>\n" + 
1920
				"</compiler>\n";
1920
		String normalizedExpectedLogContents =
1921
		String normalizedExpectedLogContents =
1921
				MessageFormat.format(
1922
				MessageFormat.format(
1922
						expectedLogContents,
1923
						expectedLogContents,
(-)src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java (-23 / +26 lines)
Lines 422-429 Link Here
422
		expectedProblemAttributes.put("DuplicateParameterizedMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
422
		expectedProblemAttributes.put("DuplicateParameterizedMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
423
		expectedProblemAttributes.put("DuplicateSuperInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
423
		expectedProblemAttributes.put("DuplicateSuperInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
424
		expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
424
		expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
425
		expectedProblemAttributes.put("DuplicateTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
426
		expectedProblemAttributes.put("DuplicateTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
425
		expectedProblemAttributes.put("DuplicateTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
426
		expectedProblemAttributes.put("DuplicateTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
427
		expectedProblemAttributes.put("EmptyControlFlowStatement", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
427
		expectedProblemAttributes.put("EmptyControlFlowStatement", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
428
		expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
428
		expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
429
		expectedProblemAttributes.put("EndOfSource", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
429
		expectedProblemAttributes.put("EndOfSource", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
Lines 452-460 Link Here
452
		expectedProblemAttributes.put("FieldTypeNotVisible", DEPRECATED);
452
		expectedProblemAttributes.put("FieldTypeNotVisible", DEPRECATED);
453
		expectedProblemAttributes.put("FinalBoundForTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
453
		expectedProblemAttributes.put("FinalBoundForTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
454
		expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
454
		expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
455
		expectedProblemAttributes.put("FinallyMustCompleteNormally", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
456
		expectedProblemAttributes.put("FinalMethodCannotBeOverridden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
455
		expectedProblemAttributes.put("FinalMethodCannotBeOverridden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
457
		expectedProblemAttributes.put("FinalOuterLocalAssignment", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
456
		expectedProblemAttributes.put("FinalOuterLocalAssignment", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
457
		expectedProblemAttributes.put("FinallyMustCompleteNormally", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
458
		expectedProblemAttributes.put("ForbiddenReference", new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
458
		expectedProblemAttributes.put("ForbiddenReference", new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
459
		expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
459
		expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
460
		expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
460
		expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
Lines 583-588 Link Here
583
		expectedProblemAttributes.put("InvalidUnicodeEscape", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
583
		expectedProblemAttributes.put("InvalidUnicodeEscape", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
584
		expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
584
		expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
585
		expectedProblemAttributes.put("InvalidUsageOfAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
585
		expectedProblemAttributes.put("InvalidUsageOfAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
586
		expectedProblemAttributes.put("InvalidUsageOfDiamondConstruct", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
586
		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
587
		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
587
		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
588
		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
588
		expectedProblemAttributes.put("InvalidUsageOfStaticImports", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
589
		expectedProblemAttributes.put("InvalidUsageOfStaticImports", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
Lines 646-654 Link Here
646
		expectedProblemAttributes.put("JavadocNotVisibleField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
647
		expectedProblemAttributes.put("JavadocNotVisibleField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
647
		expectedProblemAttributes.put("JavadocNotVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
648
		expectedProblemAttributes.put("JavadocNotVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
648
		expectedProblemAttributes.put("JavadocNotVisibleType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
649
		expectedProblemAttributes.put("JavadocNotVisibleType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
650
		expectedProblemAttributes.put("JavadocParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
649
		expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
651
		expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
650
		expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
652
		expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
651
		expectedProblemAttributes.put("JavadocParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
652
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
653
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
653
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
654
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
654
		expectedProblemAttributes.put("JavadocUndefinedConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
655
		expectedProblemAttributes.put("JavadocUndefinedConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
Lines 662-677 Link Here
662
		expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
663
		expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
663
		expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
664
		expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
664
		expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
665
		expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
665
		expectedProblemAttributes.put("LocalVariableCannotBeNull", DEPRECATED);
666
		expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", DEPRECATED);
666
		expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", DEPRECATED);
667
		expectedProblemAttributes.put("LocalVariableCannotBeNull", DEPRECATED);
667
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
668
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
668
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
669
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
669
		expectedProblemAttributes.put("LocalVariableIsNeverUsed", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
670
		expectedProblemAttributes.put("LocalVariableIsNeverUsed", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
670
		expectedProblemAttributes.put("LocalVariableMayBeNull", DEPRECATED);
671
		expectedProblemAttributes.put("LocalVariableMayBeNull", DEPRECATED);
671
		expectedProblemAttributes.put("MaskedCatch", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
672
		expectedProblemAttributes.put("MaskedCatch", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
672
		expectedProblemAttributes.put("MethodButWithConstructorName", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
673
		expectedProblemAttributes.put("MethodButWithConstructorName", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
673
		expectedProblemAttributes.put("MethodCanBeStatic", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
674
		expectedProblemAttributes.put("MethodCanBePotentiallyStatic", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
674
		expectedProblemAttributes.put("MethodCanBePotentiallyStatic", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
675
		expectedProblemAttributes.put("MethodCanBeStatic", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
675
		expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
676
		expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
676
		expectedProblemAttributes.put("MethodMustOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
677
		expectedProblemAttributes.put("MethodMustOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
677
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
678
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
Lines 740-748 Link Here
740
		expectedProblemAttributes.put("PackageCollidesWithType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
741
		expectedProblemAttributes.put("PackageCollidesWithType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
741
		expectedProblemAttributes.put("PackageIsNotExpectedPackage", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
742
		expectedProblemAttributes.put("PackageIsNotExpectedPackage", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
742
		expectedProblemAttributes.put("ParameterAssignment", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
743
		expectedProblemAttributes.put("ParameterAssignment", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
744
		expectedProblemAttributes.put("ParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
743
		expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
745
		expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
744
		expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
746
		expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
745
		expectedProblemAttributes.put("ParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
746
		expectedProblemAttributes.put("ParsingError", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
747
		expectedProblemAttributes.put("ParsingError", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
747
		expectedProblemAttributes.put("ParsingErrorDeleteToken", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
748
		expectedProblemAttributes.put("ParsingErrorDeleteToken", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
748
		expectedProblemAttributes.put("ParsingErrorDeleteTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
749
		expectedProblemAttributes.put("ParsingErrorDeleteTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
Lines 760-766 Link Here
760
		expectedProblemAttributes.put("ParsingErrorOnKeywordNoSuggestion", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
761
		expectedProblemAttributes.put("ParsingErrorOnKeywordNoSuggestion", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
761
		expectedProblemAttributes.put("ParsingErrorReplaceTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
762
		expectedProblemAttributes.put("ParsingErrorReplaceTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
762
		expectedProblemAttributes.put("ParsingErrorUnexpectedEOF", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
763
		expectedProblemAttributes.put("ParsingErrorUnexpectedEOF", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
763
		expectedProblemAttributes.put("PolymorphicMethodNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));		expectedProblemAttributes.put("PossibleAccidentalBooleanAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
764
		expectedProblemAttributes.put("PolymorphicMethodNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
765
		expectedProblemAttributes.put("PossibleAccidentalBooleanAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
764
		expectedProblemAttributes.put("PotentialHeapPollutionFromVararg", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
766
		expectedProblemAttributes.put("PotentialHeapPollutionFromVararg", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
765
		expectedProblemAttributes.put("PotentialNullLocalVariableReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
767
		expectedProblemAttributes.put("PotentialNullLocalVariableReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
766
		expectedProblemAttributes.put("PublicClassMustMatchFileName", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
768
		expectedProblemAttributes.put("PublicClassMustMatchFileName", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
Lines 769-774 Link Here
769
		expectedProblemAttributes.put("RecursiveConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
771
		expectedProblemAttributes.put("RecursiveConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
770
		expectedProblemAttributes.put("RedefinedArgument", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
772
		expectedProblemAttributes.put("RedefinedArgument", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
771
		expectedProblemAttributes.put("RedefinedLocal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
773
		expectedProblemAttributes.put("RedefinedLocal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
774
		expectedProblemAttributes.put("RedundantDeclarationOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
772
		expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
775
		expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
773
		expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
776
		expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
774
		expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
777
		expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
Lines 790-795 Link Here
790
		expectedProblemAttributes.put("StaticMemberOfParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
793
		expectedProblemAttributes.put("StaticMemberOfParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
791
		expectedProblemAttributes.put("StaticMethodRequested", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
794
		expectedProblemAttributes.put("StaticMethodRequested", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
792
		expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
795
		expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
796
		expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
797
		expectedProblemAttributes.put("SuperInterfacesCollide", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
798
		expectedProblemAttributes.put("SuperTypeUsingWildcard", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
793
		expectedProblemAttributes.put("SuperclassAmbiguous", DEPRECATED);
799
		expectedProblemAttributes.put("SuperclassAmbiguous", DEPRECATED);
794
		expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", DEPRECATED);
800
		expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", DEPRECATED);
795
		expectedProblemAttributes.put("SuperclassInternalNameProvided", DEPRECATED);
801
		expectedProblemAttributes.put("SuperclassInternalNameProvided", DEPRECATED);
Lines 797-805 Link Here
797
		expectedProblemAttributes.put("SuperclassNotFound", DEPRECATED);
803
		expectedProblemAttributes.put("SuperclassNotFound", DEPRECATED);
798
		expectedProblemAttributes.put("SuperclassNotVisible", DEPRECATED);
804
		expectedProblemAttributes.put("SuperclassNotVisible", DEPRECATED);
799
		expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
805
		expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
800
		expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
801
		expectedProblemAttributes.put("SuperInterfacesCollide", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
802
		expectedProblemAttributes.put("SuperTypeUsingWildcard", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
803
		expectedProblemAttributes.put("Task", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
806
		expectedProblemAttributes.put("Task", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
804
		expectedProblemAttributes.put("ThisInStaticContext", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
807
		expectedProblemAttributes.put("ThisInStaticContext", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
805
		expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
808
		expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
Lines 847-853 Link Here
847
		expectedProblemAttributes.put("UnnecessaryCast", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
850
		expectedProblemAttributes.put("UnnecessaryCast", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
848
		expectedProblemAttributes.put("UnnecessaryElse", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
851
		expectedProblemAttributes.put("UnnecessaryElse", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
849
		expectedProblemAttributes.put("UnnecessaryInstanceof", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
852
		expectedProblemAttributes.put("UnnecessaryInstanceof", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
850
		expectedProblemAttributes.put("UnnecessaryOperator", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
851
		expectedProblemAttributes.put("UnnecessaryNLSTag", new ProblemAttributes(CategorizedProblem.CAT_NLS));
853
		expectedProblemAttributes.put("UnnecessaryNLSTag", new ProblemAttributes(CategorizedProblem.CAT_NLS));
852
		expectedProblemAttributes.put("UnqualifiedFieldAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
854
		expectedProblemAttributes.put("UnqualifiedFieldAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
853
		expectedProblemAttributes.put("UnreachableCatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
855
		expectedProblemAttributes.put("UnreachableCatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
Lines 1080-1087 Link Here
1080
		expectedProblemAttributes.put("DuplicateParameterizedMethods", SKIP);
1082
		expectedProblemAttributes.put("DuplicateParameterizedMethods", SKIP);
1081
		expectedProblemAttributes.put("DuplicateSuperInterface", SKIP);
1083
		expectedProblemAttributes.put("DuplicateSuperInterface", SKIP);
1082
		expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", SKIP);
1084
		expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", SKIP);
1083
		expectedProblemAttributes.put("DuplicateTypes", SKIP);
1084
		expectedProblemAttributes.put("DuplicateTypeVariable", SKIP);
1085
		expectedProblemAttributes.put("DuplicateTypeVariable", SKIP);
1086
		expectedProblemAttributes.put("DuplicateTypes", SKIP);
1085
		expectedProblemAttributes.put("EmptyControlFlowStatement", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
1087
		expectedProblemAttributes.put("EmptyControlFlowStatement", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
1086
		expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", SKIP);
1088
		expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", SKIP);
1087
		expectedProblemAttributes.put("EndOfSource", SKIP);
1089
		expectedProblemAttributes.put("EndOfSource", SKIP);
Lines 1110-1118 Link Here
1110
		expectedProblemAttributes.put("FieldTypeNotVisible", SKIP);
1112
		expectedProblemAttributes.put("FieldTypeNotVisible", SKIP);
1111
		expectedProblemAttributes.put("FinalBoundForTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FINAL_PARAMETER_BOUND));
1113
		expectedProblemAttributes.put("FinalBoundForTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FINAL_PARAMETER_BOUND));
1112
		expectedProblemAttributes.put("FinalFieldAssignment", SKIP);
1114
		expectedProblemAttributes.put("FinalFieldAssignment", SKIP);
1113
		expectedProblemAttributes.put("FinallyMustCompleteNormally", new ProblemAttributes(JavaCore.COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING));
1114
		expectedProblemAttributes.put("FinalMethodCannotBeOverridden", SKIP);
1115
		expectedProblemAttributes.put("FinalMethodCannotBeOverridden", SKIP);
1115
		expectedProblemAttributes.put("FinalOuterLocalAssignment", SKIP);
1116
		expectedProblemAttributes.put("FinalOuterLocalAssignment", SKIP);
1117
		expectedProblemAttributes.put("FinallyMustCompleteNormally", new ProblemAttributes(JavaCore.COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING));
1116
		expectedProblemAttributes.put("ForbiddenReference", new ProblemAttributes(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
1118
		expectedProblemAttributes.put("ForbiddenReference", new ProblemAttributes(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
1117
		expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", SKIP);
1119
		expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", SKIP);
1118
		expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", SKIP);
1120
		expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", SKIP);
Lines 1216-1222 Link Here
1216
		expectedProblemAttributes.put("InvalidContinue", SKIP);
1218
		expectedProblemAttributes.put("InvalidContinue", SKIP);
1217
		expectedProblemAttributes.put("InvalidDigit", SKIP);
1219
		expectedProblemAttributes.put("InvalidDigit", SKIP);
1218
		expectedProblemAttributes.put("InvalidDisjunctiveTypeReferenceSequence", SKIP);
1220
		expectedProblemAttributes.put("InvalidDisjunctiveTypeReferenceSequence", SKIP);
1219
		expectedProblemAttributes.put("InvalidEmptyExoticIdentifier", SKIP);
1220
		expectedProblemAttributes.put("InvalidEncoding", SKIP);
1221
		expectedProblemAttributes.put("InvalidEncoding", SKIP);
1221
		expectedProblemAttributes.put("InvalidEscape", SKIP);
1222
		expectedProblemAttributes.put("InvalidEscape", SKIP);
1222
		expectedProblemAttributes.put("InvalidExplicitConstructorCall", SKIP);
1223
		expectedProblemAttributes.put("InvalidExplicitConstructorCall", SKIP);
Lines 1242-1247 Link Here
1242
		expectedProblemAttributes.put("InvalidUnicodeEscape", SKIP);
1243
		expectedProblemAttributes.put("InvalidUnicodeEscape", SKIP);
1243
		expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", SKIP);
1244
		expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", SKIP);
1244
		expectedProblemAttributes.put("InvalidUsageOfAnnotations", SKIP);
1245
		expectedProblemAttributes.put("InvalidUsageOfAnnotations", SKIP);
1246
		expectedProblemAttributes.put("InvalidUsageOfDiamondConstruct", SKIP);
1245
		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", SKIP);
1247
		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", SKIP);
1246
		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", SKIP);
1248
		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", SKIP);
1247
		expectedProblemAttributes.put("InvalidUsageOfStaticImports", SKIP);
1249
		expectedProblemAttributes.put("InvalidUsageOfStaticImports", SKIP);
Lines 1305-1313 Link Here
1305
		expectedProblemAttributes.put("JavadocNotVisibleField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1307
		expectedProblemAttributes.put("JavadocNotVisibleField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1306
		expectedProblemAttributes.put("JavadocNotVisibleMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1308
		expectedProblemAttributes.put("JavadocNotVisibleMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1307
		expectedProblemAttributes.put("JavadocNotVisibleType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1309
		expectedProblemAttributes.put("JavadocNotVisibleType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1310
		expectedProblemAttributes.put("JavadocParameterMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1308
		expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1311
		expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1309
		expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1312
		expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1310
		expectedProblemAttributes.put("JavadocParameterMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1311
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1313
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1312
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1314
		expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1313
		expectedProblemAttributes.put("JavadocUndefinedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1315
		expectedProblemAttributes.put("JavadocUndefinedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
Lines 1321-1336 Link Here
1321
		expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1323
		expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1322
		expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1324
		expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1323
		expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1325
		expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
1324
		expectedProblemAttributes.put("LocalVariableCannotBeNull", SKIP);
1325
		expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", SKIP);
1326
		expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", SKIP);
1327
		expectedProblemAttributes.put("LocalVariableCannotBeNull", SKIP);
1326
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1328
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1327
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1329
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1328
		expectedProblemAttributes.put("LocalVariableIsNeverUsed", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_LOCAL));
1330
		expectedProblemAttributes.put("LocalVariableIsNeverUsed", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_LOCAL));
1329
		expectedProblemAttributes.put("LocalVariableMayBeNull", SKIP);
1331
		expectedProblemAttributes.put("LocalVariableMayBeNull", SKIP);
1330
		expectedProblemAttributes.put("MaskedCatch", new ProblemAttributes(JavaCore.COMPILER_PB_HIDDEN_CATCH_BLOCK));
1332
		expectedProblemAttributes.put("MaskedCatch", new ProblemAttributes(JavaCore.COMPILER_PB_HIDDEN_CATCH_BLOCK));
1331
		expectedProblemAttributes.put("MethodButWithConstructorName", new ProblemAttributes(JavaCore.COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME));
1333
		expectedProblemAttributes.put("MethodButWithConstructorName", new ProblemAttributes(JavaCore.COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME));
1332
		expectedProblemAttributes.put("MethodCanBeStatic", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_STATIC_ON_METHOD));
1333
		expectedProblemAttributes.put("MethodCanBePotentiallyStatic", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_MISSING_STATIC_ON_METHOD));
1334
		expectedProblemAttributes.put("MethodCanBePotentiallyStatic", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_MISSING_STATIC_ON_METHOD));
1335
		expectedProblemAttributes.put("MethodCanBeStatic", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_STATIC_ON_METHOD));
1334
		expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
1336
		expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
1335
		expectedProblemAttributes.put("MethodMustOverride", SKIP);
1337
		expectedProblemAttributes.put("MethodMustOverride", SKIP);
1336
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", SKIP);
1338
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", SKIP);
Lines 1344-1350 Link Here
1344
		expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", SKIP);
1346
		expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", SKIP);
1345
		expectedProblemAttributes.put("MissingEnumConstantCase", new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH));
1347
		expectedProblemAttributes.put("MissingEnumConstantCase", new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH));
1346
		expectedProblemAttributes.put("MissingOverrideAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
1348
		expectedProblemAttributes.put("MissingOverrideAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
1347
		expectedProblemAttributes.put("MissingOverrideAnnotationForInterfaceMethodImplementation", SKIP);
1349
		expectedProblemAttributes.put("MissingOverrideAnnotationForInterfaceMethodImplementation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
1348
		expectedProblemAttributes.put("MissingReturnType", SKIP);
1350
		expectedProblemAttributes.put("MissingReturnType", SKIP);
1349
		expectedProblemAttributes.put("MissingSemiColon", SKIP);
1351
		expectedProblemAttributes.put("MissingSemiColon", SKIP);
1350
		expectedProblemAttributes.put("MissingSerialVersion", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION));
1352
		expectedProblemAttributes.put("MissingSerialVersion", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION));
Lines 1399-1407 Link Here
1399
		expectedProblemAttributes.put("PackageCollidesWithType", SKIP);
1401
		expectedProblemAttributes.put("PackageCollidesWithType", SKIP);
1400
		expectedProblemAttributes.put("PackageIsNotExpectedPackage", SKIP);
1402
		expectedProblemAttributes.put("PackageIsNotExpectedPackage", SKIP);
1401
		expectedProblemAttributes.put("ParameterAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_PARAMETER_ASSIGNMENT));
1403
		expectedProblemAttributes.put("ParameterAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_PARAMETER_ASSIGNMENT));
1404
		expectedProblemAttributes.put("ParameterMismatch", SKIP);
1402
		expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", SKIP);
1405
		expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", SKIP);
1403
		expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", SKIP);
1406
		expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", SKIP);
1404
		expectedProblemAttributes.put("ParameterMismatch", SKIP);
1405
		expectedProblemAttributes.put("ParsingError", SKIP);
1407
		expectedProblemAttributes.put("ParsingError", SKIP);
1406
		expectedProblemAttributes.put("ParsingErrorDeleteToken", SKIP);
1408
		expectedProblemAttributes.put("ParsingErrorDeleteToken", SKIP);
1407
		expectedProblemAttributes.put("ParsingErrorDeleteTokens", SKIP);
1409
		expectedProblemAttributes.put("ParsingErrorDeleteTokens", SKIP);
Lines 1429-1434 Link Here
1429
		expectedProblemAttributes.put("RecursiveConstructorInvocation", SKIP);
1431
		expectedProblemAttributes.put("RecursiveConstructorInvocation", SKIP);
1430
		expectedProblemAttributes.put("RedefinedArgument", SKIP);
1432
		expectedProblemAttributes.put("RedefinedArgument", SKIP);
1431
		expectedProblemAttributes.put("RedefinedLocal", SKIP);
1433
		expectedProblemAttributes.put("RedefinedLocal", SKIP);
1434
		expectedProblemAttributes.put("RedundantDeclarationOfTypeArguments", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_DECLARATION_OF_TYPE_ARGS));
1432
		expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
1435
		expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
1433
		expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
1436
		expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
1434
		expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
1437
		expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
Lines 1450-1465 Link Here
1450
		expectedProblemAttributes.put("StaticMemberOfParameterizedType", SKIP);
1453
		expectedProblemAttributes.put("StaticMemberOfParameterizedType", SKIP);
1451
		expectedProblemAttributes.put("StaticMethodRequested", SKIP);
1454
		expectedProblemAttributes.put("StaticMethodRequested", SKIP);
1452
		expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", SKIP);
1455
		expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", SKIP);
1453
		expectedProblemAttributes.put("SuperclassAmbiguous", SKIP);
1456
		expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", SKIP);
1457
		expectedProblemAttributes.put("SuperInterfacesCollide", SKIP);
1458
		expectedProblemAttributes.put("SuperTypeUsingWildcard", SKIP);
1459
		expectedProblemAttributes.put("SuperclassAmbiguous", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
1454
		expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", SKIP);
1460
		expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", SKIP);
1455
		expectedProblemAttributes.put("SuperclassInternalNameProvided", SKIP);
1461
		expectedProblemAttributes.put("SuperclassInternalNameProvided", SKIP);
1456
		expectedProblemAttributes.put("SuperclassMustBeAClass", SKIP);
1462
		expectedProblemAttributes.put("SuperclassMustBeAClass", SKIP);
1457
		expectedProblemAttributes.put("SuperclassNotFound", SKIP);
1463
		expectedProblemAttributes.put("SuperclassNotFound", SKIP);
1458
		expectedProblemAttributes.put("SuperclassNotVisible", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
1464
		expectedProblemAttributes.put("SuperclassNotVisible", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
1459
		expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
1465
		expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
1460
		expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", SKIP);
1461
		expectedProblemAttributes.put("SuperInterfacesCollide", SKIP);
1462
		expectedProblemAttributes.put("SuperTypeUsingWildcard", SKIP);
1463
		expectedProblemAttributes.put("Task", SKIP);
1466
		expectedProblemAttributes.put("Task", SKIP);
1464
		expectedProblemAttributes.put("ThisInStaticContext", SKIP);
1467
		expectedProblemAttributes.put("ThisInStaticContext", SKIP);
1465
		expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", SKIP);
1468
		expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", SKIP);
(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java (+42 lines)
Lines 1740-1743 Link Here
1740
		compilerOptions15,
1740
		compilerOptions15,
1741
		null);
1741
		null);
1742
}
1742
}
1743
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=339478
1744
// To verify that diamond construct is not allowed in source level 1.6 or below
1745
public void test339478a() {
1746
	this.runNegativeTest(
1747
		new String[] {
1748
			"X.java",
1749
			"public class X<T> {\n" + 
1750
			"	public static void main(String[] args) {\n" + 
1751
			"		X<String> x = new X<>();\n" + 
1752
			"		x.testFunction(\"SUCCESS\");\n" + 
1753
			"	}\n" +
1754
			"	public void testFunction(T param){\n" +
1755
			"		System.out.println(param);\n" +
1756
			"	}\n" + 
1757
			"}",
1758
		},
1759
		"----------\n" + 
1760
		"1. ERROR in X.java (at line 3)\n" + 
1761
		"	X<String> x = new X<>();\n" + 
1762
		"	                  ^\n" + 
1763
		"Incorrect number of arguments for type X<T>; it cannot be parameterized with arguments <>\n" + 
1764
		"----------\n");
1765
}
1766
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=339478
1767
// To verify that diamond construct is not allowed in source level 1.6 or below
1768
public void test339478b() {
1769
	this.runNegativeTest(
1770
		new String[] {
1771
			"X.java",
1772
			"public class X<T> {\n" +
1773
			"	public static void main(String[] args) {\n" + 
1774
			"		X<> x1 = null;\n" +
1775
			"	}\n" +
1776
			"}",
1777
		},
1778
		"----------\n" + 
1779
		"1. ERROR in X.java (at line 3)\n" + 
1780
		"	X<> x1 = null;\n" + 
1781
		"	^\n" + 
1782
		"Incorrect number of arguments for type X<T>; it cannot be parameterized with arguments <>\n" + 
1783
		"----------\n");
1784
}
1743
}
1785
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_7.java (+444 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 IBM Corporation.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * This is an implementation of an early-draft specification developed under the Java
9
 * Community Process (JCP) and is made available for testing and evaluation purposes
10
 * only. The code is not compatible with any specification of the JCP.
11
 * 
12
 * Contributors:
13
 *     IBM Corporation - initial API and implementation
14
 *******************************************************************************/
15
package org.eclipse.jdt.core.tests.compiler.regression;
16
17
import java.util.Map;
18
19
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
20
21
import junit.framework.Test;
22
public class GenericsRegressionTest_1_7 extends AbstractRegressionTest {
23
24
static {
25
//	TESTS_NAMES = new String[] { "test0014" };
26
//	TESTS_NUMBERS = new int[] { 40, 41, 43, 45, 63, 64 };
27
//	TESTS_RANGE = new int[] { 11, -1 };
28
}
29
public GenericsRegressionTest_1_7(String name) {
30
	super(name);
31
}
32
public static Test suite() {
33
	return buildMinimalComplianceTestSuite(testClass(), F_1_7);
34
}
35
public void test001() {
36
	this.runConformTest(
37
		new String[] {
38
			"X.java",
39
			"public class X<T> {\n" + 
40
			"	public static void main(String[] args) {\n" + 
41
			"		X<String> x = new X<>();\n" + 
42
			"		x.testFunction(\"SUCCESS\");\n" + 
43
			"	}\n" +
44
			"	public void testFunction(T param){\n" +
45
			"		System.out.println(param);\n" +
46
			"	}\n" + 
47
			"}",
48
		},
49
		"SUCCESS");
50
}
51
public void test001a() {
52
	this.runNegativeTest(
53
		new String[] {
54
			"X.java",
55
			"public class X<T> {\n" + 
56
			"	public static void main(String[] args) {\n" + 
57
			"		X<String> x = new X<>();\n" + 
58
			"		x.testFunction(1);\n" + 
59
			"	}\n" +
60
			"	public void testFunction(T param){\n" +
61
			"		System.out.println(param);\n" +
62
			"	}\n" + 
63
			"}",
64
		},
65
		"----------\n" + 
66
		"1. ERROR in X.java (at line 4)\n" + 
67
		"	x.testFunction(1);\n" + 
68
		"	  ^^^^^^^^^^^^\n" + 
69
		"The method testFunction(String) in the type X<String> is not applicable for the arguments (int)\n" + 
70
		"----------\n");
71
}
72
public void test001b() {
73
	this.runConformTest(
74
		new String[] {
75
			"X.java",
76
			"public class X<T> {\n" + 
77
			"	public static void main(String[] args) {\n" + 
78
			"		java.util.ArrayList<String> x = new java.util.ArrayList<>();\n" + 
79
			"		x.add(\"\");\n" +
80
			"		System.out.println(\"SUCCESS\");\n" + 
81
			"	}\n" +
82
			"}",
83
		},
84
		"SUCCESS");
85
}
86
public void test001c() {
87
	this.runNegativeTest(
88
		new String[] {
89
			"X.java",
90
			"public class X<T> {\n" + 
91
			"	public static void main(String[] args) {\n" + 
92
			"		java.util.ArrayList<String> x = new java.util.ArrayList<>();\n" + 
93
			"		x.add(1);\n" +
94
			"		System.out.println(\"SUCCESS\");\n" + 
95
			"	}\n" +
96
			"}",
97
		},
98
		"----------\n" + 
99
		"1. ERROR in X.java (at line 4)\n" + 
100
		"	x.add(1);\n" + 
101
		"	  ^^^\n" + 
102
		"The method add(int, String) in the type ArrayList<String> is not applicable for the arguments (int)\n" + 
103
		"----------\n");
104
}
105
public void _test001d() {
106
	this.runConformTest(
107
		new String[] {
108
			"X.java",
109
			"import java.util.ArrayList;\n" +
110
			"public class X<T> {" +
111
			"	public void ab(ArrayList<String> al){\n" + 
112
			"		System.out.println(\"SUCCESS\");\n" +
113
			"	}\n" + 
114
			"	public static void main(String[] args) {\n" + 
115
			"		X<String> x = new X<>();\n" + 
116
			"		x.ab(new ArrayList<>());\n" + 
117
			"	}\n" +
118
			"}",
119
		},
120
		"SUCCESS");
121
}
122
public void _test001e() {
123
	this.runNegativeTest(
124
		new String[] {
125
			"X.java",
126
			"import java.util.ArrayList;\n" +
127
			"public class X<T> {" +
128
			"	public void ab(ArrayList<T> al){\n" + 
129
			"		System.out.println(\"SUCCESS\");\n" +
130
			"	}\n" + 
131
			"	public static void main(String[] args) {\n" + 
132
			"		X<String> x = new X<>();\n" + 
133
			"		x.ab(new ArrayList<>());\n" + 
134
			"	}\n" +
135
			"}",
136
		},
137
		"----------\n" + 
138
		"1. ERROR in X.java (at line 7)\n" + 
139
		"	x.ab(new ArrayList<Integer>());\n" + 
140
		"	  ^^\n" + 
141
		"The method ab(ArrayList<String>) in the type X<String> is not applicable for the arguments (ArrayList<Integer>)\n" + 
142
		"----------\n");
143
}
144
public void test002() {
145
	this.runNegativeTest(
146
		new String[] {
147
			"X.java",
148
			"public class X<T> {\n" + 
149
			"	public static void main(String[] args) {\n" + 
150
			"		X x = new X<>();\n" + 
151
			"		x.testFunction(\"SUCCESS\");\n" + 
152
			"	}\n" +
153
			"	public void testFunction(T param){\n" +
154
			"		System.out.println(param);\n" +
155
			"	}\n" + 
156
			"}",
157
		},
158
		"----------\n" + 
159
		"1. WARNING in X.java (at line 3)\n" + 
160
		"	X x = new X<>();\n" + 
161
		"	^\n" + 
162
		"X is a raw type. References to generic type X<T> should be parameterized\n" + 
163
		"----------\n" + 
164
		"2. WARNING in X.java (at line 4)\n" + 
165
		"	x.testFunction(\"SUCCESS\");\n" + 
166
		"	^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
167
		"Type safety: The method testFunction(Object) belongs to the raw type X. References to generic type X<T> should be parameterized\n" + 
168
		"----------\n");
169
}
170
public void _test003() {
171
	this.runNegativeTest(
172
		new String[] {
173
			"X.java",
174
			"public class X<T> {\n" + 
175
			"	public static void main(String[] args) {\n" + 
176
			"		new X<>().testFunction(\"SUCCESS\");\n" + 
177
			"	}\n" +
178
			"	public void testFunction(T param){\n" +
179
			"		System.out.println(param);\n" +
180
			"	}\n" + 
181
			"}",
182
		},
183
		"SUCCESS");
184
}
185
public void test004() {
186
	this.runNegativeTest(
187
		new String[] {
188
			"X.java",
189
			"public class X<T> {\n" + 
190
			"	public static void main(String[] args) {\n" + 
191
			"		new X<>(){\n" +
192
			"			void newMethod(){\n" +
193
			"			}\n" +
194
			"		}.testFunction(\"SUCCESS\");\n" + 
195
			"	}\n" +
196
			"	public void testFunction(T param){\n" +
197
			"		System.out.println(param);\n" +
198
			"	}\n" + 
199
			"}",
200
		},
201
		"----------\n" + 
202
		"1. ERROR in X.java (at line 3)\n" + 
203
		"	new X<>(){\n" + 
204
		"	    ^\n" + 
205
		"Empty type argument list cannot be used in anonymous class declaration\n" + 
206
		"----------\n");
207
}
208
public void test005() {
209
	this.runNegativeTest(
210
		new String[] {
211
			"X.java",
212
			"public class X<T> {\n" + 
213
			"	public static void main(String[] args) {\n" + 
214
			"		X Test = new X<>(){\n" +
215
			"			void newMethod(){\n" +
216
			"			}\n" +
217
			"		}.testFunction(\"SUCCESS\");\n" + 
218
			"	}\n" +
219
			"	public void testFunction(T param){\n" +
220
			"		System.out.println(param);\n" +
221
			"	}\n" + 
222
			"}",
223
		},
224
		"----------\n" + 
225
		"1. WARNING in X.java (at line 3)\n" + 
226
		"	X Test = new X<>(){\n" + 
227
		"	^\n" + 
228
		"X is a raw type. References to generic type X<T> should be parameterized\n" + 
229
		"----------\n" + 
230
		"2. ERROR in X.java (at line 3)\n" + 
231
		"	X Test = new X<>(){\n" + 
232
		"	             ^\n" + 
233
		"Empty type argument list cannot be used in anonymous class declaration\n" + 
234
		"----------\n");
235
}
236
public void test006() {
237
	this.runConformTest(
238
		new String[] {
239
			"X.java",
240
			"class X1<T> {\n" +
241
			"	int abc = 1;\n" +
242
			"	public void testFunction(T param){\n" +
243
			"		System.out.println(param + \"X1\");\n" +
244
			"	}\n" + 
245
			"}\n" +
246
			"public class X<T> extends X1<T> {\n" + 
247
			"	public static void main(String[] args) {\n" + 
248
			"		X1<String> x = new X<>();\n" + 
249
			"		x.testFunction(\"SUCCESS\");\n" + 
250
			"	}\n" +
251
			"	public void testFunction(T param){\n" +
252
			"		System.out.println(param);\n" +
253
			"	}\n" + 
254
			"}",
255
		},
256
		"SUCCESS");
257
}
258
// shows the difference between using <> and the raw type - different semantics
259
public void _test007() {
260
	this.runConformTest(
261
		new String[] {
262
			"X.java",
263
			"public class X<T> {\n" +
264
			"	T field1;" +
265
			"	public X(T param){\n" +
266
			"		field1 = param;\n" +
267
			"	}\n" +
268
			"	public static void main(String[] args) {\n" + 
269
			"		X.testFunction(new X<>(\"hello\").getField());\n" + // prints 1
270
			"		X.testFunction(new X(\"hello\").getField());\n" + //prints 2
271
			"	}\n" +
272
			"	public static void testFunction(String param){\n" +
273
			"		System.out.println(1);\n" +
274
			"	}\n" +
275
			"	public static void testFunction(Object param){\n" +
276
			"		System.out.println(2);\n" +
277
			"	}\n" +
278
			"	public T getField(){\n" +
279
			"		return field1;" +
280
			"	}\n" + 
281
			"}",
282
		},
283
		"1\n" + 
284
		"2");
285
}
286
//shows the difference between using <> and the raw type - different semantics
287
public void _test008() {
288
	this.runConformTest(
289
		new String[] {
290
			"X.java",
291
			"public class X<T> {\n" +
292
			"	T field1;" +
293
			"	public X(T param){\n" +
294
			"		field1 = param;\n" +
295
			"	}\n" +
296
			"	public static void main(String[] args) {\n" + 
297
			"		X<?> x1 = new X(1).get(\"\");\n" + // ok - passing String where Object is expected
298
			"		X<?> x2 = new X<>(1).get(\"\");\n" + // bad - passing String where Integer is expected
299
			"	}\n" +
300
			"	public X<T> get(T t){\n" +
301
			"		return this;" +
302
			"	}\n" + 
303
			"}",
304
		},
305
		"1\n" + 
306
		"2");
307
}
308
public void test009() {
309
	this.runNegativeTest(
310
		new String[] {
311
			"X.java",
312
			"public class X<T> {\n" +
313
			"	public static void main(String[] args) {\n" + 
314
			"		X<>[] x1 = null;\n" +
315
			"	}\n" +
316
			"}",
317
		},
318
		"----------\n" + 
319
		"1. ERROR in X.java (at line 3)\n" + 
320
		"	X<>[] x1 = null;\n" + 
321
		"	^\n" + 
322
		"Incorrect number of arguments for type X<T>; it cannot be parameterized with arguments <>\n" + 
323
		"----------\n");
324
}
325
public void test010() {
326
	this.runNegativeTest(
327
		new String[] {
328
			"X.java",
329
			"public class X<T> {\n" +
330
			"	public static void main(String[] args) {\n" + 
331
			"		X<> x1 = null;\n" + 
332
			"	}\n" +
333
			"}",
334
		},
335
		"----------\n" + 
336
		"1. ERROR in X.java (at line 3)\n" + 
337
		"	X<> x1 = null;\n" + 
338
		"	^\n" + 
339
		"Incorrect number of arguments for type X<T>; it cannot be parameterized with arguments <>\n" + 
340
		"----------\n");
341
}
342
public void test011() {
343
	this.runNegativeTest(
344
		new String[] {
345
			"X.java",
346
			"public class X<T> {\n" +
347
			"	public void foo(X<> args) {\n" + 
348
			"	}\n" +
349
			"}",
350
		},
351
		"----------\n" + 
352
		"1. ERROR in X.java (at line 2)\n" + 
353
		"	public void foo(X<> args) {\n" + 
354
		"	                ^\n" + 
355
		"Incorrect number of arguments for type X<T>; it cannot be parameterized with arguments <>\n" + 
356
		"----------\n");
357
}
358
public void test012() {
359
	this.runNegativeTest(
360
		new String[] {
361
			"X.java",
362
			"public class X<T> {\n" +
363
			"	X<> f1 = null;\n" + 
364
			"}",
365
		},
366
		"----------\n" + 
367
		"1. ERROR in X.java (at line 2)\n" + 
368
		"	X<> f1 = null;\n" + 
369
		"	^\n" + 
370
		"Incorrect number of arguments for type X<>; it cannot be parameterized with arguments <>\n" + 
371
		"----------\n");
372
}
373
public void test013() {
374
	Map options = getCompilerOptions();
375
	options.put(CompilerOptions.OPTION_ReportRedundantDeclarationOfTypeArguments, CompilerOptions.ERROR);
376
	this.runNegativeTest(
377
		new String[] {
378
			"X.java",
379
			"public class X<T> {\n" +
380
			"	X<String> f1 = new X<String>();\n" +
381
			"	public void foo() {\n" +
382
			"		X<Integer> i1 = new X<Integer>();\n" +
383
			"	}\n" +
384
			"}",
385
		},
386
		"----------\n" + 
387
		"1. ERROR in X.java (at line 2)\n" + 
388
		"	X<String> f1 = new X<String>();\n" + 
389
		"	               ^^^^^^^^^^^^^^^\n" + 
390
		"Redundant declaration of type arguments <String>\n" + 
391
		"----------\n" + 
392
		"2. ERROR in X.java (at line 4)\n" + 
393
		"	X<Integer> i1 = new X<Integer>();\n" + 
394
		"	                ^^^^^^^^^^^^^^^^\n" + 
395
		"Redundant declaration of type arguments <Integer>\n" + 
396
		"----------\n",
397
		null,
398
		true,
399
		options);
400
}
401
public void test0014() {
402
	this.runConformTest(
403
		new String[] {
404
			"X.java",
405
			"public class X<J,K> {\n" + 
406
			"	public static void main(String[] args) {\n" + 
407
			"		X<String,Integer> x = new X<>();\n" + 
408
			"		x.testFunction(\"SUCCESS\", 123);\n" + 
409
			"	}\n" +
410
			"	public void testFunction(J param, K param2){\n" +
411
			"		System.out.println(param);\n" +
412
			"		System.out.println(param2);\n" +
413
			"	}\n" + 
414
			"}",
415
		},
416
		"SUCCESS\n" +
417
		"123");
418
}
419
public void test0014a() {
420
	this.runNegativeTest(
421
		new String[] {
422
			"X.java",
423
			"public class X<J,K> {\n" + 
424
			"	public static void main(String[] args) {\n" + 
425
			"		X<String,Integer> x = new X<>();\n" + 
426
			"		x.testFunction(123, \"SUCCESS\");\n" + 
427
			"	}\n" +
428
			"	public void testFunction(J param, K param2){\n" +
429
			"		System.out.println(param);\n" +
430
			"		System.out.println(param2);\n" +
431
			"	}\n" + 
432
			"}",
433
		},
434
		"----------\n" + 
435
		"1. ERROR in X.java (at line 4)\n" + 
436
		"	x.testFunction(123, \"SUCCESS\");\n" + 
437
		"	  ^^^^^^^^^^^^\n" + 
438
		"The method testFunction(String, Integer) in the type X<String,Integer> is not applicable for the arguments (int, String)\n" + 
439
		"----------\n");
440
}
441
public static Class testClass() {
442
	return GenericsRegressionTest_1_7.class;
443
}
444
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/RunComparableTests.java (+1 lines)
Lines 32-37 Link Here
32
		ALL_CLASSES.add(Compliance_1_5.class);
32
		ALL_CLASSES.add(Compliance_1_5.class);
33
		ALL_CLASSES.add(GenericTypeTest.class);
33
		ALL_CLASSES.add(GenericTypeTest.class);
34
		ALL_CLASSES.add(GenericsRegressionTest.class);
34
		ALL_CLASSES.add(GenericsRegressionTest.class);
35
		ALL_CLASSES.add(GenericsRegressionTest_1_7.class);
35
		ALL_CLASSES.add(ForeachStatementTest.class);
36
		ALL_CLASSES.add(ForeachStatementTest.class);
36
		ALL_CLASSES.add(StaticImportTest.class);
37
		ALL_CLASSES.add(StaticImportTest.class);
37
		ALL_CLASSES.add(VarargsTest.class);
38
		ALL_CLASSES.add(VarargsTest.class);

Return to bug 339478