View | Details | Raw Unified | Return to bug 249134 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+4 lines)
Lines 630-635 Link Here
630
	int RedundantSuperinterface = TypeRelated + 331;
630
	int RedundantSuperinterface = TypeRelated + 331;
631
	/** @since 3.5 */
631
	/** @since 3.5 */
632
	int ShouldImplementHashcode = TypeRelated + 332;
632
	int ShouldImplementHashcode = TypeRelated + 332;
633
	/** @since 3.5 */
634
	int AbstractMethodsInConcreteClass = TypeRelated + 333;
633
635
634
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
636
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
635
	int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
637
	int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
Lines 1281-1286 Link Here
1281
	int EnumConstantMustImplementAbstractMethod = MethodRelated + 763;
1283
	int EnumConstantMustImplementAbstractMethod = MethodRelated + 763;
1282
	/** @since 3.5 */
1284
	/** @since 3.5 */
1283
	int EnumConstantCannotDefineAbstractMethod = MethodRelated + 764;
1285
	int EnumConstantCannotDefineAbstractMethod = MethodRelated + 764;
1286
	/** @since 3.5 */
1287
	int AbstractMethodInEnum = MethodRelated + 765;
1284
1288
1285
	/**
1289
	/**
1286
	 * Var args
1290
	 * Var args
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (-1 / +3 lines)
Lines 257-262 Link Here
257
330 = The type java.lang.Object must be a class
257
330 = The type java.lang.Object must be a class
258
331 = Redundant superinterface {0} for the type {1}, already defined by {2}
258
331 = Redundant superinterface {0} for the type {1}, already defined by {2}
259
332 = The type {0} should also implement hashCode() since it overrides Object.equals()
259
332 = The type {0} should also implement hashCode() since it overrides Object.equals()
260
333 = The type {0} must be an abstract class to define abstract methods
260
261
261
###[obsolete] 330 = {0} cannot be resolved or is not a valid superclass
262
###[obsolete] 330 = {0} cannot be resolved or is not a valid superclass
262
###[obsolete] 331 = Superclass {0} is not visible
263
###[obsolete] 331 = Superclass {0} is not visible
Lines 291-297 Link Here
291
360 = The method {1} in type {0} can only set one of public / protected / private
292
360 = The method {1} in type {0} can only set one of public / protected / private
292
361 = The method {1} cannot be declared static; static methods can only be declared in a static or top level type
293
361 = The method {1} cannot be declared static; static methods can only be declared in a static or top level type
293
362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
294
362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
294
363 = The type {0} must be an abstract class to define abstract methods: {1}
295
363 = The abstract method {1} in type {0} can only be defined by an abstract class
295
364 = void is an invalid type for the parameter {1} of the method {0}
296
364 = void is an invalid type for the parameter {1} of the method {0}
296
###[obsolete] 365 = An array of void is an invalid type for the parameter {1} of the method {0}
297
###[obsolete] 365 = An array of void is an invalid type for the parameter {1} of the method {0}
297
###[obsolete] 366 = An array of void is an invalid return type for the method {0}
298
###[obsolete] 366 = An array of void is an invalid return type for the method {0}
Lines 588-593 Link Here
588
762 = Cannot refer to the static enum field {0}.{1} within an initializer
589
762 = Cannot refer to the static enum field {0}.{1} within an initializer
589
763 = The enum constant {2} must implement the abstract method {0}({1})
590
763 = The enum constant {2} must implement the abstract method {0}({1})
590
764 = The enum constant {0} cannot define abstract methods
591
764 = The enum constant {0} cannot define abstract methods
592
765 = The method {1} cannot be abstract in the enum constant {0}
591
593
592
### VARARGS
594
### VARARGS
593
800 = Extended dimensions are illegal for a variable argument
595
800 = Extended dimensions are illegal for a variable argument
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-11 / +24 lines)
Lines 480-486 Link Here
480
		type.sourceStart(),
480
		type.sourceStart(),
481
		type.sourceEnd());
481
		type.sourceEnd());
482
}
482
}
483
public void abstractMethodInAbstractClass(SourceTypeBinding type, MethodBinding[] abstractMethods) {
483
public void abstractMethodInAbstractClass(SourceTypeBinding type, AbstractMethodDeclaration methodDecl) {
484
	if (type.isEnum() && type.isLocalType()) {
485
		FieldBinding field = type.scope.enclosingMethodScope().initializedField;
486
		FieldDeclaration decl = field.sourceField();
487
		String[] arguments = new String[] {new String(decl.name), new String(methodDecl.selector)};
488
		this.handle(
489
			IProblem.AbstractMethodInEnum,
490
			arguments,
491
			arguments,
492
			methodDecl.sourceStart,
493
			methodDecl.sourceEnd);
494
	} else {
495
		String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
496
		this.handle(
497
			IProblem.AbstractMethodInAbstractClass,
498
			arguments,
499
			arguments,
500
			methodDecl.sourceStart,
501
			methodDecl.sourceEnd);
502
	}
503
}
504
public void abstractMethodInConcreteClass(SourceTypeBinding type) {
484
	if (type.isEnum() && type.isLocalType()) {
505
	if (type.isEnum() && type.isLocalType()) {
485
		FieldBinding field = type.scope.enclosingMethodScope().initializedField;
506
		FieldBinding field = type.scope.enclosingMethodScope().initializedField;
486
		FieldDeclaration decl = field.sourceField();
507
		FieldDeclaration decl = field.sourceField();
Lines 492-508 Link Here
492
			decl.sourceStart(),
513
			decl.sourceStart(),
493
			decl.sourceEnd());
514
			decl.sourceEnd());
494
	} else {
515
	} else {
495
		StringBuffer selectorsString = new StringBuffer();
516
		String[] arguments = new String[] {new String(type.sourceName())};
496
		for (int i = 0, l = abstractMethods.length; i < l;) {
497
			MethodBinding abstractMethod = abstractMethods[i++];
498
			selectorsString.append(abstractMethod.selector);
499
			selectorsString.append("()"); //$NON-NLS-1$
500
			if (i < l)
501
				selectorsString.append(", "); //$NON-NLS-1$
502
		}
503
		String[] arguments = new String[] {new String(type.sourceName()), selectorsString.toString()};
504
		this.handle(
517
		this.handle(
505
			IProblem.AbstractMethodInAbstractClass,
518
			IProblem.AbstractMethodsInConcreteClass,
506
			arguments,
519
			arguments,
507
			arguments,
520
			arguments,
508
			type.sourceStart(),
521
			type.sourceStart(),
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java (-3 / +2 lines)
Lines 198-206 Link Here
198
		int incompatibleWithAbstract = ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic | ClassFileConstants.AccFinal | ClassFileConstants.AccSynchronized | ClassFileConstants.AccNative | ClassFileConstants.AccStrictfp;
198
		int incompatibleWithAbstract = ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic | ClassFileConstants.AccFinal | ClassFileConstants.AccSynchronized | ClassFileConstants.AccNative | ClassFileConstants.AccStrictfp;
199
		if ((modifiers & incompatibleWithAbstract) != 0)
199
		if ((modifiers & incompatibleWithAbstract) != 0)
200
			problemReporter().illegalAbstractModifierCombinationForMethod(declaringClass, (AbstractMethodDeclaration) this.referenceContext);
200
			problemReporter().illegalAbstractModifierCombinationForMethod(declaringClass, (AbstractMethodDeclaration) this.referenceContext);
201
// We now report the error against the declaringClass to avoid problems with incremental builds & source vs. .class bindings
201
		if (!methodBinding.declaringClass.isAbstract())
202
//		if (!methodBinding.declaringClass.isAbstract())
202
			problemReporter().abstractMethodInAbstractClass((SourceTypeBinding) declaringClass, (AbstractMethodDeclaration) this.referenceContext);
203
//			problemReporter().abstractMethodInAbstractClass((SourceTypeBinding) declaringClass, (AbstractMethodDeclaration) this.referenceContext);
204
	}
203
	}
205
204
206
	/* DISABLED for backward compatibility with javac (if enabled should also mark private methods as final)
205
	/* DISABLED for backward compatibility with javac (if enabled should also mark private methods as final)
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java (-12 / +4 lines)
Lines 294-320 Link Here
294
				}
294
				}
295
			}
295
			}
296
		} else {
296
		} else {
297
			MethodBinding[] abstractMethods = null;
297
			boolean hasAbstractMethods = false;
298
			for (int i = 0; i < size; i++) {
298
			for (int i = 0; i < size; i++) {
299
				if (i != clinitIndex) {
299
				if (i != clinitIndex) {
300
					MethodScope scope = new MethodScope(this, methods[i], false);
300
					MethodScope scope = new MethodScope(this, methods[i], false);
301
					MethodBinding methodBinding = scope.createMethod(methods[i]);
301
					MethodBinding methodBinding = scope.createMethod(methods[i]);
302
					if (methodBinding != null) { // is null if binding could not be created
302
					if (methodBinding != null) { // is null if binding could not be created
303
						methodBindings[count++] = methodBinding;
303
						methodBindings[count++] = methodBinding;
304
						if (methodBinding.isAbstract()) {
304
						hasAbstractMethods = hasAbstractMethods || methodBinding.isAbstract();
305
							if (abstractMethods == null) {
306
								abstractMethods = new MethodBinding[] {methodBinding};
307
							} else {
308
								int length = abstractMethods.length;
309
								System.arraycopy(abstractMethods, 0, abstractMethods = new MethodBinding[length + 1], 0, length);
310
								abstractMethods[length] = methodBinding;
311
							}
312
						}
313
					}
305
					}
314
				}
306
				}
315
			}
307
			}
316
			if (abstractMethods != null)
308
			if (hasAbstractMethods)
317
				problemReporter().abstractMethodInAbstractClass(sourceType, abstractMethods);
309
				problemReporter().abstractMethodInConcreteClass(sourceType);
318
		}
310
		}
319
		if (count != methodBindings.length)
311
		if (count != methodBindings.length)
320
			System.arraycopy(methodBindings, 0, methodBindings = new MethodBinding[count], 0, count);
312
			System.arraycopy(methodBindings, 0, methodBindings = new MethodBinding[count], 0, count);
(-)Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java (-4 / +24 lines)
Lines 3550-3556 Link Here
3550
		"1. ERROR in p\\CC.java (at line 2)\n" + 
3550
		"1. ERROR in p\\CC.java (at line 2)\n" + 
3551
		"	class CC {\n" + 
3551
		"	class CC {\n" + 
3552
		"	      ^^\n" + 
3552
		"	      ^^\n" + 
3553
		"The type CC must be an abstract class to define abstract methods: m()\n" + 
3553
		"The type CC must be an abstract class to define abstract methods\n" + 
3554
		"----------\n" + 
3555
		"2. ERROR in p\\CC.java (at line 4)\n" + 
3556
		"	abstract void m(); // compile-time error \n" + 
3557
		"	              ^^^\n" + 
3558
		"The abstract method m in type CC can only be defined by an abstract class\n" + 
3554
		"----------\n"
3559
		"----------\n"
3555
	);
3560
	);
3556
}
3561
}
Lines 3569-3575 Link Here
3569
		"1. ERROR in p\\CC6.java (at line 2)\n" + 
3574
		"1. ERROR in p\\CC6.java (at line 2)\n" + 
3570
		"	class CC6 {\n" + 
3575
		"	class CC6 {\n" + 
3571
		"	      ^^^\n" + 
3576
		"	      ^^^\n" + 
3572
		"The type CC6 must be an abstract class to define abstract methods: m()\n" + 
3577
		"The type CC6 must be an abstract class to define abstract methods\n" + 
3578
		"----------\n" + 
3579
		"2. ERROR in p\\CC6.java (at line 5)\n" + 
3580
		"	abstract void m(); // compile-time error \n" + 
3581
		"	              ^^^\n" + 
3582
		"The abstract method m in type CC6 can only be defined by an abstract class\n" + 
3573
		"----------\n"
3583
		"----------\n"
3574
	);
3584
	);
3575
}
3585
}
Lines 13071-13081 Link Here
13071
		"1. ERROR in X.java (at line 1)\n" + 
13081
		"1. ERROR in X.java (at line 1)\n" + 
13072
		"	public class X {	\n" + 
13082
		"	public class X {	\n" + 
13073
		"	             ^\n" + 
13083
		"	             ^\n" + 
13074
		"The type X must be an abstract class to define abstract methods: foo()\n" + 
13084
		"The type X must be an abstract class to define abstract methods\n" + 
13075
		"----------\n" + 
13085
		"----------\n" + 
13076
		"2. ERROR in X.java (at line 2)\n" + 
13086
		"2. ERROR in X.java (at line 2)\n" + 
13077
		"	abstract foo();	\n" + 
13087
		"	abstract foo();	\n" + 
13078
		"	         ^^^^^\n" + 
13088
		"	         ^^^^^\n" + 
13089
		"The abstract method foo in type X can only be defined by an abstract class\n" + 
13090
		"----------\n" + 
13091
		"3. ERROR in X.java (at line 2)\n" + 
13092
		"	abstract foo();	\n" + 
13093
		"	         ^^^^^\n" + 
13079
		"Return type for the method is missing\n" + 
13094
		"Return type for the method is missing\n" + 
13080
		"----------\n");
13095
		"----------\n");
13081
}
13096
}
Lines 13094-13100 Link Here
13094
		"1. ERROR in X.java (at line 1)\n" + 
13109
		"1. ERROR in X.java (at line 1)\n" + 
13095
		"	public class X {	\n" + 
13110
		"	public class X {	\n" + 
13096
		"	             ^\n" + 
13111
		"	             ^\n" + 
13097
		"The type X must be an abstract class to define abstract methods: foo()\n" + 
13112
		"The type X must be an abstract class to define abstract methods\n" + 
13098
		"----------\n" + 
13113
		"----------\n" + 
13099
		"2. ERROR in X.java (at line 2)\n" + 
13114
		"2. ERROR in X.java (at line 2)\n" + 
13100
		"	int i =;	//missing init to trigger recovery \n" + 
13115
		"	int i =;	//missing init to trigger recovery \n" + 
Lines 13104-13109 Link Here
13104
		"3. ERROR in X.java (at line 3)\n" + 
13119
		"3. ERROR in X.java (at line 3)\n" + 
13105
		"	abstract foo();	\n" + 
13120
		"	abstract foo();	\n" + 
13106
		"	         ^^^^^\n" + 
13121
		"	         ^^^^^\n" + 
13122
		"The abstract method foo in type X can only be defined by an abstract class\n" + 
13123
		"----------\n" + 
13124
		"4. ERROR in X.java (at line 3)\n" + 
13125
		"	abstract foo();	\n" + 
13126
		"	         ^^^^^\n" + 
13107
		"Return type for the method is missing\n" + 
13127
		"Return type for the method is missing\n" + 
13108
		"----------\n"
13128
		"----------\n"
13109
);
13129
);
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java (-1 / +1 lines)
Lines 1292-1298 Link Here
1292
		ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
1292
		ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
1293
		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
1293
		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
1294
		CompilationUnit unit = (CompilationUnit) result;
1294
		CompilationUnit unit = (CompilationUnit) result;
1295
		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$<
1295
		assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
1296
		ASTNode node = getASTNode(unit, 0, 0);
1296
		ASTNode node = getASTNode(unit, 0, 0);
1297
		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
1297
		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
1298
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
1298
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java (-1 / +1 lines)
Lines 1215-1221 Link Here
1215
		ASTNode result = runConversion(sourceUnit, true);
1215
		ASTNode result = runConversion(sourceUnit, true);
1216
		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
1216
		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
1217
		CompilationUnit unit = (CompilationUnit) result;
1217
		CompilationUnit unit = (CompilationUnit) result;
1218
		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$<
1218
		assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
1219
		ASTNode node = getASTNode(unit, 0, 0);
1219
		ASTNode node = getASTNode(unit, 0, 0);
1220
		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
1220
		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
1221
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
1221
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
(-)src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (-1 / +21 lines)
Lines 9156-9162 Link Here
9156
		"1. ERROR in I.java (at line 13)\n" + 
9156
		"1. ERROR in I.java (at line 13)\n" + 
9157
		"	class A2 {\n" + 
9157
		"	class A2 {\n" + 
9158
		"	      ^^\n" + 
9158
		"	      ^^\n" + 
9159
		"The type A2 must be an abstract class to define abstract methods: m(), n(), o(), p()\n" + 
9159
		"The type A2 must be an abstract class to define abstract methods\n" + 
9160
		"----------\n" + 
9161
		"2. ERROR in I.java (at line 14)\n" + 
9162
		"	public abstract Object m();\n" + 
9163
		"	                       ^^^\n" + 
9164
		"The abstract method m in type A2 can only be defined by an abstract class\n" + 
9165
		"----------\n" + 
9166
		"3. ERROR in I.java (at line 15)\n" + 
9167
		"	public abstract String n();\n" + 
9168
		"	                       ^^^\n" + 
9169
		"The abstract method n in type A2 can only be defined by an abstract class\n" + 
9170
		"----------\n" + 
9171
		"4. ERROR in I.java (at line 16)\n" + 
9172
		"	abstract Object o();\n" + 
9173
		"	                ^^^\n" + 
9174
		"The abstract method o in type A2 can only be defined by an abstract class\n" + 
9175
		"----------\n" + 
9176
		"5. ERROR in I.java (at line 17)\n" + 
9177
		"	abstract String p();\n" + 
9178
		"	                ^^^\n" + 
9179
		"The abstract method p in type A2 can only be defined by an abstract class\n" + 
9160
		"----------\n" + 
9180
		"----------\n" + 
9161
		"----------\n" + 
9181
		"----------\n" + 
9162
		"1. ERROR in B.java (at line 1)\n" + 
9182
		"1. ERROR in B.java (at line 1)\n" + 
(-)src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java (-1 / +15 lines)
Lines 4862-4868 Link Here
4862
			"		@Override\n" +
4862
			"		@Override\n" +
4863
			"		abstract double eval(double x, double y);\n" +
4863
			"		abstract double eval(double x, double y);\n" +
4864
			"	};\n" +
4864
			"	};\n" +
4865
			"\n" +
4866
			"	abstract double eval(double x, double y);\n" +
4865
			"	abstract double eval(double x, double y);\n" +
4867
			"}\n" +
4866
			"}\n" +
4868
			"\n", // =================
4867
			"\n", // =================
Lines 4877-4882 Link Here
4877
		"	MINUS {\n" + 
4876
		"	MINUS {\n" + 
4878
		"	^^^^^\n" + 
4877
		"	^^^^^\n" + 
4879
		"The enum constant MINUS cannot define abstract methods\n" + 
4878
		"The enum constant MINUS cannot define abstract methods\n" + 
4879
		"----------\n" + 
4880
		"3. ERROR in X.java (at line 9)\n" + 
4881
		"	abstract double eval(double x, double y);\n" + 
4882
		"	                ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
4883
		"The method eval cannot be abstract in the enum constant MINUS\n" + 
4880
		"----------\n"
4884
		"----------\n"
4881
	);
4885
	);
4882
}
4886
}
Lines 4914-4919 Link Here
4914
		"	MINUS {\n" + 
4918
		"	MINUS {\n" + 
4915
		"	^^^^^\n" + 
4919
		"	^^^^^\n" + 
4916
		"The enum constant MINUS must implement the abstract method eval(double, double)\n" + 
4920
		"The enum constant MINUS must implement the abstract method eval(double, double)\n" + 
4921
		"----------\n" + 
4922
		"4. ERROR in X.java (at line 8)\n" + 
4923
		"	abstract double eval2(double x, double y);\n" + 
4924
		"	                ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
4925
		"The method eval2 cannot be abstract in the enum constant MINUS\n" + 
4917
		"----------\n"
4926
		"----------\n"
4918
	);
4927
	);
4919
}
4928
}
Lines 4995-5000 Link Here
4995
		"	A {\n" + 
5004
		"	A {\n" + 
4996
		"	^\n" + 
5005
		"	^\n" + 
4997
		"The enum constant A cannot define abstract methods\n" + 
5006
		"The enum constant A cannot define abstract methods\n" + 
5007
		"----------\n" + 
5008
		"2. ERROR in X.java (at line 7)\n" + 
5009
		"	public abstract String a();\n" + 
5010
		"	                       ^^^\n" + 
5011
		"The method a cannot be abstract in the enum constant A\n" + 
4998
		"----------\n");
5012
		"----------\n");
4999
}
5013
}
5000
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186822
5014
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186822
(-)src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java (+4 lines)
Lines 546-551 Link Here
546
		expectedProblemAttributes.put("ObjectMustBeClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
546
		expectedProblemAttributes.put("ObjectMustBeClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
547
		expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
547
		expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
548
		expectedProblemAttributes.put("ShouldImplementHashcode", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
548
		expectedProblemAttributes.put("ShouldImplementHashcode", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
549
		expectedProblemAttributes.put("AbstractMethodsInConcreteClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
549
		expectedProblemAttributes.put("SuperclassNotFound", DEPRECATED);
550
		expectedProblemAttributes.put("SuperclassNotFound", DEPRECATED);
550
		expectedProblemAttributes.put("SuperclassNotVisible", DEPRECATED);
551
		expectedProblemAttributes.put("SuperclassNotVisible", DEPRECATED);
551
		expectedProblemAttributes.put("SuperclassAmbiguous", DEPRECATED);
552
		expectedProblemAttributes.put("SuperclassAmbiguous", DEPRECATED);
Lines 840-845 Link Here
840
		expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
841
		expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
841
		expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
842
		expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
842
		expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
843
		expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
844
		expectedProblemAttributes.put("AbstractMethodInEnum", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
843
		expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
845
		expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
844
		expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
846
		expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
845
		expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
847
		expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
Lines 1171-1176 Link Here
1171
		expectedProblemAttributes.put("ObjectMustBeClass", SKIP);
1173
		expectedProblemAttributes.put("ObjectMustBeClass", SKIP);
1172
		expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
1174
		expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
1173
		expectedProblemAttributes.put("ShouldImplementHashcode", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
1175
		expectedProblemAttributes.put("ShouldImplementHashcode", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
1176
		expectedProblemAttributes.put("AbstractMethodsInConcreteClass", SKIP);
1174
		expectedProblemAttributes.put("SuperclassNotFound", SKIP);
1177
		expectedProblemAttributes.put("SuperclassNotFound", SKIP);
1175
		expectedProblemAttributes.put("SuperclassNotVisible", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
1178
		expectedProblemAttributes.put("SuperclassNotVisible", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
1176
		expectedProblemAttributes.put("SuperclassAmbiguous", SKIP);
1179
		expectedProblemAttributes.put("SuperclassAmbiguous", SKIP);
Lines 1465-1470 Link Here
1465
		expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", SKIP);
1468
		expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", SKIP);
1466
		expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", SKIP);
1469
		expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", SKIP);
1467
		expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", SKIP);
1470
		expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", SKIP);
1471
		expectedProblemAttributes.put("AbstractMethodInEnum", SKIP);
1468
		expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", SKIP);
1472
		expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", SKIP);
1469
		expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
1473
		expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
1470
		expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
1474
		expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));

Return to bug 249134