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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java (-1 / +3 lines)
Lines 254-260 Link Here
254
		if (receiverType == null) {
254
		if (receiverType == null) {
255
			hasError = true;
255
			hasError = true;
256
		} else if (((ReferenceBinding) receiverType).isFinal() && this.anonymousType != null) {
256
		} else if (((ReferenceBinding) receiverType).isFinal() && this.anonymousType != null) {
257
			if (!receiverType.isEnum()) {
257
			if (receiverType.isEnum()) {
258
				scope.problemReporter().cannotInstantiate(type, receiverType);
259
			} else {
258
				scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType);
260
				scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType);
259
			}
261
			}
260
			hasError = true;
262
			hasError = true;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java (+4 lines)
Lines 491-496 Link Here
491
					modifiers |= AccAbstract;
491
					modifiers |= AccAbstract;
492
				}
492
				}
493
			}
493
			}
494
			modifiers |= AccFinal;
494
		} else {
495
		} else {
495
			// detect abnormal cases for classes
496
			// detect abnormal cases for classes
496
			if (isMemberType) { // includes member types defined inside local types
497
			if (isMemberType) { // includes member types defined inside local types
Lines 588-593 Link Here
588
		
589
		
589
			// set the modifiers
590
			// set the modifiers
590
			int implicitValue = AccPublic | AccStatic | AccFinal | AccEnum;
591
			int implicitValue = AccPublic | AccStatic | AccFinal | AccEnum;
592
			if (fieldDecl.initialization instanceof QualifiedAllocationExpression) {
593
				declaringClass.modifiers &= ~AccFinal;
594
			}
591
			fieldBinding.modifiers|= implicitValue;
595
			fieldBinding.modifiers|= implicitValue;
592
			return;
596
			return;
593
		}
597
		}

Return to bug 99428