Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 131032 Details for
Bug 268542
Remove unused validation problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
More problems removed
patchFor268542_4 (text/plain), 204.86 KB, created by
Chris Jaun
on 2009-04-06 14:30:49 EDT
(
hide
)
Description:
More problems removed
Filename:
MIME Type:
Creator:
Chris Jaun
Created:
2009-04-06 14:30:49 EDT
Size:
204.86 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.jsdt.ui >Index: src/org/eclipse/wst/jsdt/internal/ui/fix/Java50CleanUp.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/fix/Java50CleanUp.java,v >retrieving revision 1.6 >diff -u -r1.6 Java50CleanUp.java >--- src/org/eclipse/wst/jsdt/internal/ui/fix/Java50CleanUp.java 12 Mar 2009 05:01:07 -0000 1.6 >+++ src/org/eclipse/wst/jsdt/internal/ui/fix/Java50CleanUp.java 6 Apr 2009 18:29:51 -0000 >@@ -156,16 +156,6 @@ > public int maximalNumberOfFixes(JavaScriptUnit compilationUnit) { > int result= 0; > IProblem[] problems= compilationUnit.getProblems(); >- if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)) { >- result+= getNumberOfProblems(problems, IProblem.MissingOverrideAnnotation); >- } >- if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED)) { >- for (int i=0;i<problems.length;i++) { >- int id= problems[i].getID(); >- if (id == IProblem.FieldMissingDeprecatedAnnotation || id == IProblem.MethodMissingDeprecatedAnnotation || id == IProblem.TypeMissingDeprecatedAnnotation) >- result++; >- } >- } > if (isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES)) { > for (int i=0;i<problems.length;i++) { > int id= problems[i].getID(); >Index: src/org/eclipse/wst/jsdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java,v >retrieving revision 1.7 >diff -u -r1.7 ModifierCorrectionSubProcessor.java >--- src/org/eclipse/wst/jsdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java 13 May 2008 22:03:02 -0000 1.7 >+++ src/org/eclipse/wst/jsdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java 6 Apr 2009 18:29:51 -0000 >@@ -639,30 +639,6 @@ > proposals.add(new ModifierChangeCompletionProposal(label, cu, binding, selectedNode, Modifier.FINAL, 0, 5, image)); > } > } >-// >-// public static void addOverrideAnnotationProposal(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException { >-// IFix fix= Java50Fix.createAddOverrideAnnotationFix(context.getASTRoot(), problem); >-// if (fix != null) { >-// Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); >-// Map options= new Hashtable(); >-// options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS, CleanUpConstants.TRUE); >-// options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE, CleanUpConstants.TRUE); >-// FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new Java50CleanUp(options), 5, image, context); >-// proposals.add(proposal); >-// } >-// } >-// >-// public static void addDeprecatedAnnotationProposal(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException { >-// IFix fix= Java50Fix.createAddDeprectatedAnnotation(context.getASTRoot(), problem); >-// if (fix != null) { >-// Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); >-// Map options= new Hashtable(); >-// options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS, CleanUpConstants.TRUE); >-// options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED, CleanUpConstants.TRUE); >-// FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new Java50CleanUp(options), 5, image, context); >-// proposals.add(proposal); >-// } >-// } > > public static void addOverridingDeprecatedMethodProposal(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException { > >@@ -692,27 +668,6 @@ > ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 15, image); > proposals.add(proposal); > } >- >- public static void removeOverrideAnnotationProposal(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException { >-// IJavaScriptUnit cu= context.getCompilationUnit(); >-// >-// ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot()); >-// if (!(selectedNode instanceof FunctionDeclaration)) { >-// return; >-// } >-// FunctionDeclaration methodDecl= (FunctionDeclaration) selectedNode; >-// Annotation annot= findAnnotation("java.lang.Override", methodDecl.modifiers()); //$NON-NLS-1$ >-// if (annot != null) { >-// ASTRewrite rewrite= ASTRewrite.create(annot.getAST()); >-// rewrite.remove(annot, null); >-// String label= CorrectionMessages.ModifierCorrectionSubProcessor_remove_override; >-// Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); >-// ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 6, image); >-// proposals.add(proposal); >-// >-// QuickAssistProcessor.getCreateInSuperClassProposals(context, methodDecl.getName(), proposals); >-// } >- } > > private static final String KEY_MODIFIER= "modifier"; //$NON-NLS-1$ > >Index: src/org/eclipse/wst/jsdt/internal/ui/text/correction/QuickFixProcessor.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/QuickFixProcessor.java,v >retrieving revision 1.11 >diff -u -r1.11 QuickFixProcessor.java >--- src/org/eclipse/wst/jsdt/internal/ui/text/correction/QuickFixProcessor.java 12 Mar 2009 05:01:07 -0000 1.11 >+++ src/org/eclipse/wst/jsdt/internal/ui/text/correction/QuickFixProcessor.java 6 Apr 2009 18:29:51 -0000 >@@ -157,20 +157,8 @@ > case IProblem.RedefinedArgument: > case IProblem.CodeCannotBeReached: > case IProblem.InvalidUsageOfTypeParameters: >- case IProblem.InvalidUsageOfStaticImports: > case IProblem.InvalidUsageOfForeachStatements: >- case IProblem.InvalidUsageOfTypeArguments: >- case IProblem.InvalidUsageOfEnumDeclarations: >- case IProblem.InvalidUsageOfVarargs: >- case IProblem.InvalidUsageOfAnnotations: >- case IProblem.InvalidUsageOfAnnotationDeclarations: >- case IProblem.FieldMissingDeprecatedAnnotation: > case IProblem.OverridingDeprecatedMethod: >- case IProblem.MethodMissingDeprecatedAnnotation: >- case IProblem.TypeMissingDeprecatedAnnotation: >- case IProblem.MissingOverrideAnnotation: >- case IProblem.MethodMustOverride: >- case IProblem.MethodMustOverrideOrImplement: > case IProblem.IsClassPathCorrect: > case IProblem.MethodReturnsVoid: > case IProblem.ForbiddenReference: >@@ -178,11 +166,8 @@ > case IProblem.UnnecessaryNLSTag: > case IProblem.AssignmentHasNoEffect: > case IProblem.UnsafeTypeConversion: >- case IProblem.UndefinedAnnotationMember: >- case IProblem.MissingValueForAnnotationMember: > case IProblem.FallthroughCase: > case IProblem.NonGenericType: >- case IProblem.UnhandledWarningToken: > return true; > default: > // if (JavaModelUtil.is50OrHigher(cu.getJavaScriptProject())) { >@@ -483,30 +468,12 @@ > LocalCorrectionsSubProcessor.getUnreachableCodeProposals(context, problem, proposals); > break; > case IProblem.InvalidUsageOfTypeParameters: >- case IProblem.InvalidUsageOfStaticImports: > case IProblem.InvalidUsageOfForeachStatements: >- case IProblem.InvalidUsageOfTypeArguments: >- case IProblem.InvalidUsageOfEnumDeclarations: >- case IProblem.InvalidUsageOfVarargs: >- case IProblem.InvalidUsageOfAnnotations: >- case IProblem.InvalidUsageOfAnnotationDeclarations: > ReorgCorrectionsSubProcessor.getNeed50ComplianceProposals(context, problem, proposals); > break; > case IProblem.NonGenericType: > TypeParameterMismatchSubProcessor.removeMismatchedParameters(context, problem, proposals); > break; >-// case IProblem.MissingOverrideAnnotation: >-// ModifierCorrectionSubProcessor.addOverrideAnnotationProposal(context, problem, proposals); >-// break; >- case IProblem.MethodMustOverride: >- case IProblem.MethodMustOverrideOrImplement: >- ModifierCorrectionSubProcessor.removeOverrideAnnotationProposal(context, problem, proposals); >- break; >- case IProblem.FieldMissingDeprecatedAnnotation: >- case IProblem.MethodMissingDeprecatedAnnotation: >- case IProblem.TypeMissingDeprecatedAnnotation: >-// ModifierCorrectionSubProcessor.addDeprecatedAnnotationProposal(context, problem, proposals); >- break; > case IProblem.OverridingDeprecatedMethod: > ModifierCorrectionSubProcessor.addOverridingDeprecatedMethodProposal(context, problem, proposals); > break; >#P org.eclipse.wst.jsdt.core >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/SwitchStatement.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/SwitchStatement.java,v >retrieving revision 1.13 >diff -u -r1.13 SwitchStatement.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/SwitchStatement.java 30 Apr 2008 21:32:18 -0000 1.13 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/SwitchStatement.java 6 Apr 2009 18:29:55 -0000 >@@ -220,27 +220,6 @@ > upperScope.problemReporter().undocumentedEmptyBlock(this.blockStart, this.sourceEnd); > } > } >- // for enum switch, check if all constants are accounted for (if no default) >-// if (isEnumSwitch && defaultCase == null >-// && upperScope.compilerOptions().getSeverity(CompilerOptions.IncompleteEnumSwitch) != ProblemSeverities.Ignore) { >-// int constantCount = this.constants == null ? 0 : this.constants.length; // could be null if no case statement >-// if (constantCount == caseCount // ignore diagnosis if unresolved constants >-// && caseCount != ((ReferenceBinding)expressionType).enumConstantCount()) { >-// FieldBinding[] enumFields = ((ReferenceBinding)expressionType.erasure()).fields(); >-// for (int i = 0, max = enumFields.length; i <max; i++) { >-// FieldBinding enumConstant = enumFields[i]; >-// if ((enumConstant.modifiers & ClassFileConstants.AccEnum) == 0) continue; >-// findConstant : { >-// for (int j = 0; j < caseCount; j++) { >-// if ((enumConstant.id + 1) == this.constants[j]) // zero should not be returned see bug 141810 >-// break findConstant; >-// } >-// // enum constant did not get referenced from switch >-// upperScope.problemReporter().missingEnumConstantCase(this, enumConstant); >-// } >-// } >-// } >-// } > } finally { > if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedNameReference.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedNameReference.java,v >retrieving revision 1.7 >diff -u -r1.7 QualifiedNameReference.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedNameReference.java 30 Apr 2008 21:32:18 -0000 1.7 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedNameReference.java 6 Apr 2009 18:29:55 -0000 >@@ -67,21 +67,6 @@ > if (needValue || complyTo14) { > manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, this.actualReceiverType, 0, flowInfo); > } >- if (this.indexOfFirstFieldBinding == 1) { // was an implicit reference to the first field binding >- ReferenceBinding declaringClass = lastFieldBinding.declaringClass; >- // check if accessing enum static field in initializer >- if (declaringClass.isEnum()) { >- MethodScope methodScope = currentScope.methodScope(); >- SourceTypeBinding sourceType = methodScope.enclosingSourceType(); >- if (lastFieldBinding.isStatic() >- && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body >- && lastFieldBinding.constant() == Constant.NotAConstant >- && !methodScope.isStatic >- && methodScope.isInsideInitializerOrConstructor()) { >- currentScope.problemReporter().enumStaticFieldUsedDuringInitialization(lastFieldBinding, this); >- } >- } >- } > // check if final blank field > if (lastFieldBinding.isBlankFinal() > && this.otherBindings != null // the last field binding is only assigned >@@ -222,19 +207,7 @@ > } > if (this.indexOfFirstFieldBinding == 1) { // was an implicit reference to the first field binding > FieldBinding fieldBinding = (FieldBinding) this.binding; >- ReferenceBinding declaringClass = fieldBinding.declaringClass; >- // check if accessing enum static field in initializer >- if (declaringClass.isEnum()) { >- MethodScope methodScope = currentScope.methodScope(); >- SourceTypeBinding sourceType = methodScope.enclosingSourceType(); >- if (fieldBinding.isStatic() >- && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body >- && fieldBinding.constant() == Constant.NotAConstant >- && !methodScope.isStatic >- && methodScope.isInsideInitializerOrConstructor()) { >- currentScope.problemReporter().enumStaticFieldUsedDuringInitialization(fieldBinding, this); >- } >- } >+ > // check if reading a final blank field > if (fieldBinding.isBlankFinal() > && currentScope.allowBlankFinalFieldAssignment(fieldBinding) >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/InstanceOfExpression.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/InstanceOfExpression.java,v >retrieving revision 1.5 >diff -u -r1.5 InstanceOfExpression.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/InstanceOfExpression.java 30 Apr 2008 21:32:19 -0000 1.5 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/InstanceOfExpression.java 6 Apr 2009 18:29:54 -0000 >@@ -70,9 +70,7 @@ > if (expressionType == null || checkedType == null) > return null; > >- if (!checkedType.isReifiable()) { >- scope.problemReporter().illegalInstanceOfGenericType(checkedType, this); >- } else if ((expressionType != TypeBinding.NULL && expressionType.isBaseType()) // disallow autoboxing >+ if ((expressionType != TypeBinding.NULL && expressionType.isBaseType()) // disallow autoboxing > || !checkCastTypesCompatibility(scope, checkedType, expressionType, null)) { > scope.problemReporter().notCompatibleTypesError(this, expressionType, checkedType); > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedAllocationExpression.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedAllocationExpression.java,v >retrieving revision 1.6 >diff -u -r1.6 QualifiedAllocationExpression.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedAllocationExpression.java 30 Apr 2008 21:32:18 -0000 1.6 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/QualifiedAllocationExpression.java 6 Apr 2009 18:29:55 -0000 >@@ -27,10 +27,8 @@ > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReferenceBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.RawTypeBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.TagBits; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeConstants; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds; > > /** > * Variation on allocation, where can optionally be specified any of: >@@ -232,9 +230,6 @@ > TypeReference typeReference = this.typeArguments[i]; > TypeBinding argType = typeReference.resolveType(scope, true /* check bounds*/); > if (argType == null) { >- if (typeReference instanceof Wildcard) { >- scope.problemReporter().illegalUsageOfWildcard(typeReference); >- } > return null; // error already reported > } > this.genericTypeArguments[i] = argType; >@@ -333,13 +328,7 @@ > // insert anonymous type in scope > scope.addAnonymousType(this.anonymousType, (ReferenceBinding) receiverType); > this.anonymousType.resolve(scope); >- if (this.superTypeBinding.erasure().id == TypeIds.T_JavaLangEnum) { >- scope.problemReporter().cannotExtendEnum(this.anonymousType.binding, this.type, this.superTypeBinding); >- } > >- if ((receiverType.tagBits & TagBits.HasDirectWildcard) != 0) { >- scope.problemReporter().superTypeCannotUseWildcard(this.anonymousType.binding, this.type, receiverType); >- } > // find anonymous super constructor > MethodBinding inheritedBinding = scope.getConstructor(this.superTypeBinding, argumentTypes, this); > if (!inheritedBinding.isValidBinding()) { >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldDeclaration.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldDeclaration.java,v >retrieving revision 1.9 >diff -u -r1.9 FieldDeclaration.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldDeclaration.java 13 May 2008 22:02:31 -0000 1.9 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldDeclaration.java 6 Apr 2009 18:29:54 -0000 >@@ -26,7 +26,6 @@ > import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodScope; > import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope; > import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.TagBits; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding; > > public class FieldDeclaration extends AbstractVariableDeclaration implements IFieldDeclaration { >@@ -169,12 +168,6 @@ > initializationScope.lastVisibleFieldID = this.binding.id; > > // resolveAnnotations(initializationScope, this.annotations, this.binding); >- // check @Deprecated annotation presence >- if ((this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0 >- && (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0 >- && initializationScope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { >- initializationScope.problemReporter().missingDeprecatedAnnotationForField(this); >- } > // the resolution of the initialization hasn't been done > if (this.initialization == null) { > this.binding.setConstant(Constant.NotAConstant); >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/AnnotationMethodDeclaration.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/AnnotationMethodDeclaration.java,v >retrieving revision 1.6 >diff -u -r1.6 AnnotationMethodDeclaration.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/AnnotationMethodDeclaration.java 30 Apr 2008 21:32:18 -0000 1.6 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/AnnotationMethodDeclaration.java 6 Apr 2009 18:29:54 -0000 >@@ -93,15 +93,6 @@ > public void resolveStatements() { > > super.resolveStatements(); >- if (this.arguments != null) { >- scope.problemReporter().annotationMembersCannotHaveParameters(this); >- } >- if (this.typeParameters != null) { >- scope.problemReporter().annotationMembersCannotHaveTypeParameters(this); >- } >- if (this.extendedDimensions != 0) { >- scope.problemReporter().illegalExtendedDimensions(this); >- } > if (this.binding == null) return; > TypeBinding returnTypeBinding = this.binding.returnType; > if (returnTypeBinding != null) { >@@ -126,7 +117,6 @@ > if (leafReturnType.isEnum() || leafReturnType.isAnnotationType()) > break checkAnnotationMethodType; > } >- scope.problemReporter().invalidAnnotationMemberType(this); > } > if (this.defaultValue != null) { > MemberValuePair pair = new MemberValuePair(this.selector, this.sourceStart, this.sourceEnd, this.defaultValue); >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/ExplicitConstructorCall.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ExplicitConstructorCall.java,v >retrieving revision 1.6 >diff -u -r1.6 ExplicitConstructorCall.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/ExplicitConstructorCall.java 30 Apr 2008 21:32:19 -0000 1.6 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/ExplicitConstructorCall.java 6 Apr 2009 18:29:54 -0000 >@@ -235,10 +235,6 @@ > if (receiverType == null) { > return; > } >- // prevent (explicit) super constructor invocation from within enum >- if (this.accessMode == Super && receiverType.erasure().id == T_JavaLangEnum) { >- scope.problemReporter().cannotInvokeSuperConstructorInEnum(this, methodScope.referenceMethod().binding); >- } > // qualification should be from the type of the enclosingType > if (qualification != null) { > if (accessMode != Super) { >@@ -267,9 +263,6 @@ > if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) { > argHasError = true; > } >- if (argHasError && typeReference instanceof Wildcard) { >- scope.problemReporter().illegalUsageOfWildcard(typeReference); >- } > } > if (argHasError) { > return; >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/CaseStatement.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/CaseStatement.java,v >retrieving revision 1.5 >diff -u -r1.5 CaseStatement.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/CaseStatement.java 30 Apr 2008 21:32:19 -0000 1.5 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/CaseStatement.java 6 Apr 2009 18:29:54 -0000 >@@ -41,9 +41,6 @@ > FlowInfo flowInfo) { > > if (constantExpression != null) { >- if (!this.isEnumConstant && constantExpression.constant == Constant.NotAConstant) { >- currentScope.problemReporter().caseExpressionMustBeConstant(constantExpression); >- } > this.constantExpression.analyseCode(currentScope, flowContext, flowInfo); > } > return flowInfo; >@@ -106,11 +103,6 @@ > && (constantExpression.bits & RestrictiveFlagMASK) == Binding.FIELD) { > NameReference reference = (NameReference) constantExpression; > FieldBinding field = reference.fieldBinding(); >- if ((field.modifiers & ClassFileConstants.AccEnum) == 0) { >- scope.problemReporter().enumSwitchCannotTargetField(reference, field); >- } else if (reference instanceof QualifiedNameReference) { >- scope.problemReporter().cannotUseQualifiedEnumConstantInCaseLabel(reference, field); >- } > return IntConstant.fromValue(field.original().id + 1); // (ordinal value + 1) zero should not be returned see bug 141810 > } > } else { >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/AbstractMethodDeclaration.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/AbstractMethodDeclaration.java,v >retrieving revision 1.24 >diff -u -r1.24 AbstractMethodDeclaration.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/AbstractMethodDeclaration.java 1 Oct 2008 21:44:09 -0000 1.24 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/AbstractMethodDeclaration.java 6 Apr 2009 18:29:54 -0000 >@@ -37,7 +37,6 @@ > import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope; > import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.TagBits; > import org.eclipse.wst.jsdt.internal.compiler.parser.Parser; > import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation; > import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilationUnit; >@@ -376,16 +375,7 @@ > if (JavaScriptCore.IS_ECMASCRIPT4) > bindThrownExceptions(); > resolveJavadoc(); >-// if (JavaScriptCore.IS_ECMASCRIPT4) >-// resolveAnnotations(scope, this.annotations, this.binding); > resolveStatements(); >- // check @Deprecated annotation presence >- if (this.binding != null >- && (this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0 >- && (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0 >- && this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { >- this.scope.problemReporter().missingDeprecatedAnnotationForMethod(this); >- } > } catch (AbortMethod e) { // ========= abort on fatal error ============= > this.ignoreFurtherInvestigation = true; > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java,v >retrieving revision 1.9 >diff -u -r1.9 TypeDeclaration.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java 1 Oct 2008 21:44:08 -0000 1.9 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java 6 Apr 2009 18:29:55 -0000 >@@ -310,10 +310,6 @@ > // report the problem and continue the parsing > parser.problemReporter().interfaceCannotHaveConstructors((ConstructorDeclaration) am); > break; >- case TypeDeclaration.ANNOTATION_TYPE_DECL : >- // report the problem and continue the parsing >- parser.problemReporter().annotationTypeDeclarationCannotHaveConstructor((ConstructorDeclaration) am); >- break; > > } > hasConstructor = true; >@@ -862,12 +858,6 @@ > // } finally { > // this.staticInitializerScope.insideTypeAnnotation = old; > // } >- // check @Deprecated annotation >- if ((sourceType.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0 >- && (sourceType.modifiers & ClassFileConstants.AccDeprecated) != 0 >- && this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { >- this.scope.problemReporter().missingDeprecatedAnnotationForType(this); >- } > if ((this.bits & ASTNode.UndocumentedEmptyBlock) != 0) { > this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd); > } >@@ -985,30 +975,6 @@ > if (needSerialVersion) { > this.scope.problemReporter().missingSerialVersion(this); > } >- // check extends/implements for annotation type >- switch(kind(this.modifiers)) { >- case TypeDeclaration.ANNOTATION_TYPE_DECL : >- if (this.superclass != null) { >- this.scope.problemReporter().annotationTypeDeclarationCannotHaveSuperclass(this); >- } >- if (this.superInterfaces != null) { >- this.scope.problemReporter().annotationTypeDeclarationCannotHaveSuperinterfaces(this); >- } >- break; >- case TypeDeclaration.ENUM_DECL : >- // check enum abstract methods >- if (this.binding.isAbstract()) { >- if (!hasEnumConstants || hasEnumConstantsWithoutBody) { >- for (int i = 0, count = this.methods.length; i < count; i++) { >- final AbstractMethodDeclaration methodDeclaration = this.methods[i]; >- if (methodDeclaration.isAbstract() && methodDeclaration.binding != null) { >- this.scope.problemReporter().enumAbstractMethodMustBeImplemented(methodDeclaration); >- } >- } >- } >- } >- break; >- } > > int missingAbstractMethodslength = this.missingAbstractMethods == null ? 0 : this.missingAbstractMethods.length; > int methodsLength = this.methods == null ? 0 : this.methods.length; >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/ASTNode.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ASTNode.java,v >retrieving revision 1.17 >diff -u -r1.17 ASTNode.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/ASTNode.java 12 Mar 2009 05:00:39 -0000 1.17 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/ASTNode.java 6 Apr 2009 18:29:54 -0000 >@@ -308,22 +308,10 @@ > ArrayBinding varargsType = (ArrayBinding) params[varargsIndex]; > TypeBinding lastArgType = argumentTypes[varargsIndex]; > int dimensions; >- if (lastArgType == TypeBinding.NULL) { >- if (!(varargsType.leafComponentType().isBaseType() && varargsType.dimensions() == 1)) >- scope.problemReporter().varargsArgumentNeedCast(method, lastArgType, invocationSite); >- } else if (varargsType.dimensions <= (dimensions = lastArgType.dimensions())) { >+ if (lastArgType != TypeBinding.NULL && (varargsType.dimensions <= (dimensions = lastArgType.dimensions()))) { > if (lastArgType.leafComponentType().isBaseType()) { > dimensions--; > } >- if (varargsType.dimensions < dimensions) { >- scope.problemReporter().varargsArgumentNeedCast(method, lastArgType, invocationSite); >- } else if (varargsType.dimensions == dimensions >- && lastArgType != varargsType >- && lastArgType.leafComponentType().erasure() != varargsType.leafComponentType.erasure() >- && lastArgType.isCompatibleWith(varargsType.elementsType()) >- && lastArgType.isCompatibleWith(varargsType)) { >- scope.problemReporter().varargsArgumentNeedCast(method, lastArgType, invocationSite); >- } > } > } > } else { >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/MemberValuePair.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/MemberValuePair.java,v >retrieving revision 1.5 >diff -u -r1.5 MemberValuePair.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/MemberValuePair.java 30 Apr 2008 21:32:19 -0000 1.5 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/MemberValuePair.java 6 Apr 2009 18:29:54 -0000 >@@ -13,12 +13,9 @@ > import org.eclipse.wst.jsdt.core.ast.IASTNode; > import org.eclipse.wst.jsdt.core.ast.IMemberValuePair; > import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor; >-import org.eclipse.wst.jsdt.internal.compiler.impl.Constant; > import org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypeBinding; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.Binding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ElementValuePair; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding; > >@@ -79,7 +76,6 @@ > ArrayInitializer initializer = (ArrayInitializer) this.value; > valueType = initializer.resolveTypeExpecting(scope, this.binding.returnType); > } else if (this.value instanceof ArrayAllocationExpression) { >- scope.problemReporter().annotationValueMustBeArrayInitializer(this.binding.declaringClass, this.name, this.value); > this.value.resolveType(scope); > valueType = null; // no need to pursue > } else { >@@ -100,9 +96,7 @@ > || (leafType.isBaseType() && BaseTypeBinding.isWidening(leafType.id, valueType.id))) > || valueType.isCompatibleWith(leafType))) { > >- if (leafType.isAnnotationType() && !valueType.isAnnotationType()) { >- scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); >- } else { >+ if (!leafType.isAnnotationType() || valueType.isAnnotationType()) { > scope.problemReporter().typeMismatchError(valueType, requiredType, this.value); > } > return; // may allow to proceed to find more errors at once >@@ -124,97 +118,14 @@ > case T_double : > case T_boolean : > case T_JavaLangString : >- if (this.value instanceof ArrayInitializer) { >- ArrayInitializer initializer = (ArrayInitializer) this.value; >- final Expression[] expressions = initializer.expressions; >- if (expressions != null) { >- for (int i =0, max = expressions.length; i < max; i++) { >- if (expressions[i].constant == Constant.NotAConstant) { >- scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, expressions[i], false); >- } >- } >- } >- } else if (this.value.constant == Constant.NotAConstant) { >- if (valueType.isArrayType()) { >- scope.problemReporter().annotationValueMustBeArrayInitializer(this.binding.declaringClass, this.name, this.value); >- } else { >- scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, this.value, false); >- } >- } > break checkAnnotationMethodType; > case T_JavaLangClass : >- if (this.value instanceof ArrayInitializer) { >- ArrayInitializer initializer = (ArrayInitializer) this.value; >- final Expression[] expressions = initializer.expressions; >- if (expressions != null) { >- for (int i =0, max = expressions.length; i < max; i++) { >- Expression currentExpression = expressions[i]; >- if (!(currentExpression instanceof ClassLiteralAccess)) { >- scope.problemReporter().annotationValueMustBeClassLiteral(this.binding.declaringClass, this.name, currentExpression); >- } >- } >- } >- } else if (!(this.value instanceof ClassLiteralAccess)) { >- scope.problemReporter().annotationValueMustBeClassLiteral(this.binding.declaringClass, this.name, this.value); >- } > break checkAnnotationMethodType; > } > if (leafType.isEnum()) { >- if (this.value instanceof NullLiteral) { >- scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, this.value, true); >- } else if (this.value instanceof ArrayInitializer) { >- ArrayInitializer initializer = (ArrayInitializer) this.value; >- final Expression[] expressions = initializer.expressions; >- if (expressions != null) { >- for (int i =0, max = expressions.length; i < max; i++) { >- Expression currentExpression = expressions[i]; >- if (currentExpression instanceof NullLiteral) { >- scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true); >- } else if (currentExpression instanceof NameReference) { >- NameReference nameReference = (NameReference) currentExpression; >- final Binding nameReferenceBinding = nameReference.binding; >- if (nameReferenceBinding.kind() == Binding.FIELD) { >- FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding; >- if (!fieldBinding.declaringClass.isEnum()) { >- scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true); >- } >- } >- } >- } >- } >- } else if (this.value instanceof NameReference) { >- NameReference nameReference = (NameReference) this.value; >- final Binding nameReferenceBinding = nameReference.binding; >- if (nameReferenceBinding.kind() == Binding.FIELD) { >- FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding; >- if (!fieldBinding.declaringClass.isEnum()) { >- if (!fieldBinding.type.isArrayType()) { >- scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, this.value, true); >- } else { >- scope.problemReporter().annotationValueMustBeArrayInitializer(this.binding.declaringClass, this.name, this.value); >- } >- } >- } >- } > break checkAnnotationMethodType; > } > if (leafType.isAnnotationType()) { >- if (!valueType.leafComponentType().isAnnotationType()) { // check annotation type and also reject null literal >- scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); >- } else if (this.value instanceof ArrayInitializer) { >- ArrayInitializer initializer = (ArrayInitializer) this.value; >- final Expression[] expressions = initializer.expressions; >- if (expressions != null) { >- for (int i =0, max = expressions.length; i < max; i++) { >- Expression currentExpression = expressions[i]; >- if (currentExpression instanceof NullLiteral || !(currentExpression instanceof Annotation)) { >- scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, currentExpression, leafType); >- } >- } >- } >- } else if (!(this.value instanceof Annotation)) { >- scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); >- } > break checkAnnotationMethodType; > } > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/MethodDeclaration.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/MethodDeclaration.java,v >retrieving revision 1.12 >diff -u -r1.12 MethodDeclaration.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/MethodDeclaration.java 2 Apr 2009 05:56:49 -0000 1.12 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/MethodDeclaration.java 6 Apr 2009 18:29:54 -0000 >@@ -15,7 +15,6 @@ > import org.eclipse.wst.jsdt.core.ast.IFunctionDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor; > import org.eclipse.wst.jsdt.internal.compiler.CompilationResult; >-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.wst.jsdt.internal.compiler.flow.ExceptionHandlingFlowContext; > import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext; > import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo; >@@ -155,32 +154,7 @@ > } > } > >- // check @Override annotation > final CompilerOptions compilerOptions = this.scope.compilerOptions(); >- checkOverride: { >- if (this.binding == null) break checkOverride; >- long sourceLevel = compilerOptions.sourceLevel; >- if (sourceLevel < ClassFileConstants.JDK1_5) break checkOverride; >- int bindingModifiers = this.binding.modifiers; >- boolean hasOverrideAnnotation = (this.binding.tagBits & TagBits.AnnotationOverride) != 0; >- boolean isInterfaceMethod = this.binding.declaringClass.isInterface(); >- if (hasOverrideAnnotation) { >- // no static method is considered overriding >- if (!isInterfaceMethod && (bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccOverriding)) == ExtraCompilerModifiers.AccOverriding) >- break checkOverride; >- // in 1.5, strictly for overriding superclass method >- // in 1.6 and above, also tolerate implementing interface method >- if (sourceLevel >= ClassFileConstants.JDK1_6 >- && ((bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccImplementing)) == ExtraCompilerModifiers.AccImplementing)) >- break checkOverride; >- // claims to override, and doesn't actually do so >- this.scope.problemReporter().methodMustOverride(this); >- } else if (!isInterfaceMethod >- && (bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccOverriding)) == ExtraCompilerModifiers.AccOverriding) { >- // actually overrides, but did not claim to do so >- this.scope.problemReporter().missingOverrideAnnotation(this); >- } >- } > > // by grammatical construction, interface methods are always abstract > // switch (TypeDeclaration.kind(this.scope.referenceType().modifiers)) { >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/Annotation.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/Annotation.java,v >retrieving revision 1.6 >diff -u -r1.6 Annotation.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/Annotation.java 30 Apr 2008 21:32:18 -0000 1.6 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/Annotation.java 6 Apr 2009 18:29:54 -0000 >@@ -14,7 +14,6 @@ > import org.eclipse.wst.jsdt.core.ast.IAnnotation; > import org.eclipse.wst.jsdt.core.compiler.CharOperation; > import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor; >-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions; > import org.eclipse.wst.jsdt.internal.compiler.impl.Constant; > import org.eclipse.wst.jsdt.internal.compiler.lookup.AnnotationBinding; >@@ -143,9 +142,7 @@ > FieldBinding field = ((Reference) initExpr).fieldBinding(); > if (field != null && field.declaringClass.id == T_JavaLangAnnotationElementType) { > long element = getTargetElementType(field.name); >- if ((tagBits & element) != 0) { >- scope.problemReporter().duplicateTargetInTargetAnnotation(annotationType, (NameReference)initExpr); >- } else { >+ if ((tagBits & element) == 0) { > tagBits |= element; > } > } >@@ -210,8 +207,6 @@ > if (irritant != 0) { > suppressWarningIrritants |= irritant; > if (~suppressWarningIrritants == 0) break pairLoop; >- } else { >- scope.problemReporter().unhandledWarningToken(inits[j]); > } > } > } >@@ -223,8 +218,6 @@ > if (irritant != 0) { > suppressWarningIrritants |= irritant; > if (~suppressWarningIrritants == 0) break pairLoop; >- } else { >- scope.problemReporter().unhandledWarningToken(value); > } > } > } >@@ -290,26 +283,20 @@ > if (otherPair == null) continue; > if (CharOperation.equals(otherPair.name, selector)) { > foundDuplicate = true; >- scope.problemReporter().duplicateAnnotationValue(annotationType, otherPair); > otherPair.binding = method; > otherPair.resolveTypeExpecting(scope, method.returnType); > pairs[k] = null; > } > } > if (foundDuplicate) { >- scope.problemReporter().duplicateAnnotationValue(annotationType, pair); > continue nextMember; > } > } > } >- if (!foundValue && (method.modifiers & ClassFileConstants.AccAnnotationDefault) == 0) { >- scope.problemReporter().missingValueForAnnotationMember(this, selector); >- } > } > // check unused pairs > for (int i = 0; i < pairsLength; i++) { > if (pairs[i] != null) { >- scope.problemReporter().undefinedAnnotationValue(annotationType, pairs[i]); > pairs[i].resolveTypeExpecting(scope, null); // resilient > } > } >@@ -408,7 +395,6 @@ > break checkTargetCompatibility; > break; > } >- scope.problemReporter().disallowedTargetForAnnotation(this); > } > } > return this.resolvedType; >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java,v >retrieving revision 1.27 >diff -u -r1.27 SingleNameReference.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java 3 Dec 2008 22:14:04 -0000 1.27 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java 6 Apr 2009 18:29:55 -0000 >@@ -28,9 +28,7 @@ > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemFieldBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReferenceBinding; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TagBits; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding; >@@ -92,19 +90,6 @@ > manageSyntheticAccessIfNecessary(currentScope, flowInfo, false /*write-access*/); > > FieldBinding fieldBinding = (FieldBinding) binding; >- ReferenceBinding declaringClass = fieldBinding.declaringClass; >- // check if accessing enum static field in initializer >- if (declaringClass.isEnum()) { >- MethodScope methodScope = currentScope.methodScope(); >- SourceTypeBinding sourceType = currentScope.enclosingSourceType(); >- if (fieldBinding.isStatic() >- && this.constant == Constant.NotAConstant >- && !methodScope.isStatic >- && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body >- && methodScope.isInsideInitializerOrConstructor()) { >- currentScope.problemReporter().enumStaticFieldUsedDuringInitialization(fieldBinding, this); >- } >- } > // check if assigning a final field > if (fieldBinding.isFinal()) { > // inside a context where allowed >@@ -160,19 +145,7 @@ > manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/); > } > FieldBinding fieldBinding = (FieldBinding) binding; >- ReferenceBinding declaringClass = fieldBinding.declaringClass; >- // check if accessing enum static field in initializer >- if (declaringClass.isEnum()) { >- MethodScope methodScope = currentScope.methodScope(); >- SourceTypeBinding sourceType = currentScope.enclosingSourceType(); >- if (fieldBinding.isStatic() >- && this.constant == Constant.NotAConstant >- && !methodScope.isStatic >- && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body >- && methodScope.isInsideInitializerOrConstructor()) { >- currentScope.problemReporter().enumStaticFieldUsedDuringInitialization(fieldBinding, this); >- } >- } >+ > // check if reading a final blank field > if (fieldBinding.isBlankFinal() && currentScope.allowBlankFinalFieldAssignment(fieldBinding)) { > if (!flowInfo.isDefinitelyAssigned(fieldBinding)) { >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/CompilationUnitDeclaration.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/CompilationUnitDeclaration.java,v >retrieving revision 1.30 >diff -u -r1.30 CompilationUnitDeclaration.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/CompilationUnitDeclaration.java 12 Mar 2009 05:00:39 -0000 1.30 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/CompilationUnitDeclaration.java 6 Apr 2009 18:29:54 -0000 >@@ -393,9 +393,6 @@ > this.javadoc.resolve(this.scope); > } > } >- if (this.currentPackage != null && this.currentPackage.annotations != null && !isPackageInfo) { >- scope.problemReporter().invalidFileNameForPackageAnnotations(this.currentPackage.annotations[0]); >- } > try { > if (types != null) { > for (int i = startingTypeIndex, count = types.length; i < count; i++) { >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/MessageSend.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/MessageSend.java,v >retrieving revision 1.29 >diff -u -r1.29 MessageSend.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/MessageSend.java 12 Mar 2009 05:00:39 -0000 1.29 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/MessageSend.java 6 Apr 2009 18:29:54 -0000 >@@ -405,7 +405,6 @@ > case ProblemReasons.NonStaticReferenceInConstructorInvocation : > case ProblemReasons.NonStaticReferenceInStaticContext : > case ProblemReasons.ReceiverTypeNotVisible : >- case ProblemReasons.ParameterBoundMismatch : > // only steal returnType in cases listed above > if (closestMatch != null) this.resolvedType = closestMatch.returnType; > default : >Index: src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.32 >diff -u -r1.32 ProblemReporter.java >--- src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java 12 Mar 2009 05:00:40 -0000 1.32 >+++ src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java 6 Apr 2009 18:29:58 -0000 >@@ -29,8 +29,6 @@ > import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractVariableDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ast.AllocationExpression; >-import org.eclipse.wst.jsdt.internal.compiler.ast.Annotation; >-import org.eclipse.wst.jsdt.internal.compiler.ast.AnnotationMethodDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ast.Argument; > import org.eclipse.wst.jsdt.internal.compiler.ast.ArrayAllocationExpression; > import org.eclipse.wst.jsdt.internal.compiler.ast.ArrayQualifiedTypeReference; >@@ -59,7 +57,6 @@ > import org.eclipse.wst.jsdt.internal.compiler.ast.Literal; > import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ast.LongLiteral; >-import org.eclipse.wst.jsdt.internal.compiler.ast.MemberValuePair; > import org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend; > import org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ast.NameReference; >@@ -72,7 +69,6 @@ > import org.eclipse.wst.jsdt.internal.compiler.ast.ReturnStatement; > import org.eclipse.wst.jsdt.internal.compiler.ast.SingleNameReference; > import org.eclipse.wst.jsdt.internal.compiler.ast.Statement; >-import org.eclipse.wst.jsdt.internal.compiler.ast.SwitchStatement; > import org.eclipse.wst.jsdt.internal.compiler.ast.ThisReference; > import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.ast.TypeParameter; >@@ -89,7 +85,6 @@ > import org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite; > import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding; >-import org.eclipse.wst.jsdt.internal.compiler.lookup.ParameterizedGenericMethodBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemMethodBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReasons; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReferenceBinding; >@@ -206,8 +201,6 @@ > return CompilerOptions.FieldHiding; > > case IProblem.TypeParameterHidingType: >- case IProblem.TypeHidingTypeParameterFromType: >- case IProblem.TypeHidingTypeParameterFromMethod: > case IProblem.TypeHidingType: > return CompilerOptions.TypeHiding; > >@@ -243,14 +236,6 @@ > case IProblem.UnsafeReturnTypeOverride: > return CompilerOptions.UncheckedTypeOperation; > >- case IProblem.MissingOverrideAnnotation: >- return CompilerOptions.MissingOverrideAnnotation; >- >- case IProblem.FieldMissingDeprecatedAnnotation: >- case IProblem.MethodMissingDeprecatedAnnotation: >- case IProblem.TypeMissingDeprecatedAnnotation: >- return CompilerOptions.MissingDeprecatedAnnotation; >- > case IProblem.FinalBoundForTypeVariable: > return CompilerOptions.FinalParameterBound; > >@@ -263,10 +248,6 @@ > case IProblem.DiscouragedReference: > return CompilerOptions.DiscouragedReference; > >- case IProblem.MethodVarargsArgumentNeedCast : >- case IProblem.ConstructorVarargsArgumentNeedCast : >- return CompilerOptions.VarargsArgumentNeedCast; >- > case IProblem.NullLocalVariableReference: > return CompilerOptions.NullReference; > >@@ -288,15 +269,6 @@ > case IProblem.UnboxingConversion : > return CompilerOptions.AutoBoxing; > >- case IProblem.MissingEnumConstantCase : >- return CompilerOptions.IncompleteEnumSwitch; >- >- case IProblem.AnnotationTypeUsedAsSuperInterface : >- return CompilerOptions.AnnotationSuperInterface; >- >- case IProblem.UnhandledWarningToken : >- return CompilerOptions.UnhandledWarningToken; >- > case IProblem.UnusedLabel : > return CompilerOptions.UnusedLabel; > >@@ -342,16 +314,6 @@ > case IProblem.JavadocInheritedFieldHidesEnclosingName: > case IProblem.JavadocInheritedNameHidesEnclosingTypeName: > case IProblem.JavadocNonStaticTypeFromStaticInvocation: >- case IProblem.JavadocGenericMethodTypeArgumentMismatch: >- case IProblem.JavadocNonGenericMethod: >- case IProblem.JavadocIncorrectArityForParameterizedMethod: >- case IProblem.JavadocParameterizedMethodArgumentTypeMismatch: >- case IProblem.JavadocTypeArgumentsForRawGenericMethod: >- case IProblem.JavadocGenericConstructorTypeArgumentMismatch: >- case IProblem.JavadocNonGenericConstructor: >- case IProblem.JavadocIncorrectArityForParameterizedConstructor: >- case IProblem.JavadocParameterizedConstructorArgumentTypeMismatch: >- case IProblem.JavadocTypeArgumentsForRawGenericConstructor: > case IProblem.JavadocNotVisibleField: > case IProblem.JavadocNotVisibleConstructor: > case IProblem.JavadocNotVisibleMethod: >@@ -385,8 +347,6 @@ > case IProblem.WrongNumberOfArguments: > return CompilerOptions.WrongNumberOfArguments; > >- case IProblem.NonConstantExpression: >- return CompilerOptions.SwitchCaseShouldBeConstant; > case IProblem.MissingSemiColon: > return CompilerOptions.OptionalSemicolon; > >@@ -466,20 +426,15 @@ > switch (irritantInt) { > case (int)(CompilerOptions.FinalParameterBound >>> 32): > case (int)(CompilerOptions.EnumUsedAsAnIdentifier >>> 32): >- case (int)(CompilerOptions.AnnotationSuperInterface >>> 32): > case (int)(CompilerOptions.AutoBoxing >>> 32): >- case (int)(CompilerOptions.MissingOverrideAnnotation >>> 32): >- case (int)(CompilerOptions.MissingDeprecatedAnnotation >>> 32): > case (int)(CompilerOptions.ParameterAssignment >>> 32): > return CategorizedProblem.CAT_CODE_STYLE; > > case (int)(CompilerOptions.MissingSerialVersion >>> 32): >- case (int)(CompilerOptions.VarargsArgumentNeedCast >>> 32): > case (int)(CompilerOptions.NullReference >>> 32): > case (int)(CompilerOptions.PotentialNullReference >>> 32): > case (int)(CompilerOptions.DuplicateLocalVariables >>> 32): > case (int)(CompilerOptions.RedundantNullCheck >>> 32): >- case (int)(CompilerOptions.IncompleteEnumSwitch >>> 32): > case (int)(CompilerOptions.FallthroughCase >>> 32): > case (int)(CompilerOptions.OverridingMethodWithoutSuperInvocation >>> 32): > return CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM; >@@ -487,7 +442,6 @@ > case (int)(CompilerOptions.TypeHiding >>> 32): > return CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT; > >- case (int)(CompilerOptions.UnhandledWarningToken >>> 32): > case (int)(CompilerOptions.UnusedLabel >>> 32): > return CategorizedProblem.CAT_UNNECESSARY_CODE; > >@@ -608,132 +562,6 @@ > location.sourceStart, > location.sourceEnd); > } >-public void annotationCannotOverrideMethod(MethodBinding overrideMethod, MethodBinding inheritedMethod) { >- ASTNode location = overrideMethod.sourceMethod(); >- this.handle( >- IProblem.AnnotationCannotOverrideMethod, >- new String[] { >- new String(overrideMethod.declaringClass.readableName()), >- new String(inheritedMethod.declaringClass.readableName()), >- new String(inheritedMethod.selector), >- typesAsString(inheritedMethod.isVarargs(), inheritedMethod.parameters, false)}, >- new String[] { >- new String(overrideMethod.declaringClass.shortReadableName()), >- new String(inheritedMethod.declaringClass.shortReadableName()), >- new String(inheritedMethod.selector), >- typesAsString(inheritedMethod.isVarargs(), inheritedMethod.parameters, true)}, >- location.sourceStart, >- location.sourceEnd); >-} >-public void annotationCircularity(TypeBinding sourceType, TypeBinding otherType, TypeReference reference) { >- if (sourceType == otherType) >- this.handle( >- IProblem.AnnotationCircularitySelfReference, >- new String[] {new String(sourceType.readableName())}, >- new String[] {new String(sourceType.shortReadableName())}, >- reference.sourceStart, >- reference.sourceEnd); >- else >- this.handle( >- IProblem.AnnotationCircularity, >- new String[] {new String(sourceType.readableName()), new String(otherType.readableName())}, >- new String[] {new String(sourceType.shortReadableName()), new String(otherType.shortReadableName())}, >- reference.sourceStart, >- reference.sourceEnd); >-} >-public void annotationMembersCannotHaveParameters(AnnotationMethodDeclaration annotationMethodDeclaration) { >- this.handle( >- IProblem.AnnotationMembersCannotHaveParameters, >- NoArgument, >- NoArgument, >- annotationMethodDeclaration.sourceStart, >- annotationMethodDeclaration.sourceEnd); >-} >-public void annotationMembersCannotHaveTypeParameters(AnnotationMethodDeclaration annotationMethodDeclaration) { >- this.handle( >- IProblem.AnnotationMembersCannotHaveTypeParameters, >- NoArgument, >- NoArgument, >- annotationMethodDeclaration.sourceStart, >- annotationMethodDeclaration.sourceEnd); >-} >-public void annotationTypeDeclarationCannotHaveConstructor(ConstructorDeclaration constructorDeclaration) { >- this.handle( >- IProblem.AnnotationTypeDeclarationCannotHaveConstructor, >- NoArgument, >- NoArgument, >- constructorDeclaration.sourceStart, >- constructorDeclaration.sourceEnd); >-} >-public void annotationTypeDeclarationCannotHaveSuperclass(TypeDeclaration typeDeclaration) { >- this.handle( >- IProblem.AnnotationTypeDeclarationCannotHaveSuperclass, >- NoArgument, >- NoArgument, >- typeDeclaration.sourceStart, >- typeDeclaration.sourceEnd); >-} >-public void annotationTypeDeclarationCannotHaveSuperinterfaces(TypeDeclaration typeDeclaration) { >- this.handle( >- IProblem.AnnotationTypeDeclarationCannotHaveSuperinterfaces, >- NoArgument, >- NoArgument, >- typeDeclaration.sourceStart, >- typeDeclaration.sourceEnd); >-} >-public void annotationTypeUsedAsSuperinterface(SourceTypeBinding type, TypeReference superInterfaceRef, ReferenceBinding superType) { >- this.handle( >- IProblem.AnnotationTypeUsedAsSuperInterface, >- new String[] {new String(superType.readableName()), new String(type.sourceName())}, >- new String[] {new String(superType.shortReadableName()), new String(type.sourceName())}, >- superInterfaceRef.sourceStart, >- superInterfaceRef.sourceEnd); >-} >-public void annotationValueMustBeAnnotation(TypeBinding annotationType, char[] name, Expression value, TypeBinding expectedType) { >- String str = new String(name); >- this.handle( >- IProblem.AnnotationValueMustBeAnnotation, >- new String[] { new String(annotationType.readableName()), str, new String(expectedType.readableName()), }, >- new String[] { new String(annotationType.shortReadableName()), str, new String(expectedType.readableName()), }, >- value.sourceStart, >- value.sourceEnd); >-} >-public void annotationValueMustBeArrayInitializer(TypeBinding annotationType, char[] name, Expression value) { >- String str = new String(name); >- this.handle( >- IProblem.AnnotationValueMustBeArrayInitializer, >- new String[] { new String(annotationType.readableName()), str }, >- new String[] { new String(annotationType.shortReadableName()), str}, >- value.sourceStart, >- value.sourceEnd); >-} >-public void annotationValueMustBeClassLiteral(TypeBinding annotationType, char[] name, Expression value) { >- String str = new String(name); >- this.handle( >- IProblem.AnnotationValueMustBeClassLiteral, >- new String[] { new String(annotationType.readableName()), str }, >- new String[] { new String(annotationType.shortReadableName()), str}, >- value.sourceStart, >- value.sourceEnd); >-} >-public void annotationValueMustBeConstant(TypeBinding annotationType, char[] name, Expression value, boolean isEnum) { >- String str = new String(name); >- if (isEnum) { >- this.handle( >- IProblem.AnnotationValueMustBeAnEnumConstant, >- new String[] { new String(annotationType.readableName()), str }, >- new String[] { new String(annotationType.shortReadableName()), str}, >- value.sourceStart, >- value.sourceEnd); >- } else { >- this.handle( >- IProblem.AnnotationValueMustBeConstant, >- new String[] { new String(annotationType.readableName()), str }, >- new String[] { new String(annotationType.shortReadableName()), str}, >- value.sourceStart, >- value.sourceEnd); >- } >-} > public void anonymousClassCannotExtendFinalClass(Expression expression, TypeBinding type) { > this.handle( > IProblem.AnonymousClassCannotExtendFinalClass, >@@ -891,18 +719,6 @@ > messageSend.sourceStart, > messageSend.sourceEnd); > } >-public void cannotExtendEnum(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) { >- String name = new String(type.sourceName()); >- String superTypeFullName = new String(superTypeBinding.readableName()); >- String superTypeShortName = new String(superTypeBinding.shortReadableName()); >- if (superTypeShortName.equals(name)) superTypeShortName = superTypeFullName; >- this.handle( >- IProblem.CannotExtendEnum, >- new String[] {superTypeFullName, name}, >- new String[] {superTypeShortName, name}, >- superclass.sourceStart, >- superclass.sourceEnd); >-} > public void cannotImportPackage(ImportReference importRef) { > String[] arguments = new String[] {CharOperation.toString(importRef.tokens)}; > this.handle( >@@ -920,20 +736,6 @@ > typeRef.sourceStart, > typeRef.sourceEnd); > } >-public void cannotInvokeSuperConstructorInEnum(ExplicitConstructorCall constructorCall, MethodBinding enumConstructor) { >- this.handle( >- IProblem.CannotInvokeSuperConstructorInEnum, >- new String[] { >- new String(enumConstructor.declaringClass.sourceName()), >- typesAsString(enumConstructor.isVarargs(), enumConstructor.parameters, false), >- }, >- new String[] { >- new String(enumConstructor.declaringClass.sourceName()), >- typesAsString(enumConstructor.isVarargs(), enumConstructor.parameters, true), >- }, >- constructorCall.sourceStart, >- constructorCall.sourceEnd); >-} > public void cannotReadSource(CompilationUnitDeclaration unit, AbortCompilationUnit abortException, boolean verbose) { > String fileName = new String(unit.compilationResult.fileName); > if (abortException.exception instanceof CharConversionException) { >@@ -1002,14 +804,6 @@ > exception.sourceStart, > exception.sourceEnd); > } >-public void cannotUseQualifiedEnumConstantInCaseLabel(Reference location, FieldBinding field) { >- this.handle( >- IProblem.IllegalQualifiedEnumConstantLabel, >- new String[]{ String.valueOf(field.declaringClass.readableName()), String.valueOf(field.name) }, >- new String[]{ String.valueOf(field.declaringClass.shortReadableName()), String.valueOf(field.name) }, >- nodeSourceStart(field, location), >- nodeSourceEnd(field, location)); >-} > public void cannotUseSuperInCodeSnippet(int start, int end) { > this.handle( > IProblem.CannotUseSuperInCodeSnippet, >@@ -1027,14 +821,6 @@ > reference.sourceStart, > reference.sourceEnd); > } >-public void caseExpressionMustBeConstant(Expression expression) { >- this.handle( >- IProblem.NonConstantExpression, >- NoArgument, >- NoArgument, >- expression.sourceStart, >- expression.sourceEnd); >-} > public void classExtendFinalClass(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) { > String name = new String(type.sourceName()); > String superTypeFullName = new String(superTypeBinding.readableName()); >@@ -1088,8 +874,6 @@ > switch (problemID) { > case IProblem.Task : > return ProblemSeverities.Warning; >- case IProblem.VarargsConflict : >- return ProblemSeverities.Warning; > case IProblem.TypeCollidesWithPackage : > return ProblemSeverities.Warning; > >@@ -1136,16 +920,6 @@ > case IProblem.JavadocInheritedFieldHidesEnclosingName: > case IProblem.JavadocInheritedNameHidesEnclosingTypeName: > case IProblem.JavadocNonStaticTypeFromStaticInvocation: >- case IProblem.JavadocGenericMethodTypeArgumentMismatch: >- case IProblem.JavadocNonGenericMethod: >- case IProblem.JavadocIncorrectArityForParameterizedMethod: >- case IProblem.JavadocParameterizedMethodArgumentTypeMismatch: >- case IProblem.JavadocTypeArgumentsForRawGenericMethod: >- case IProblem.JavadocGenericConstructorTypeArgumentMismatch: >- case IProblem.JavadocNonGenericConstructor: >- case IProblem.JavadocIncorrectArityForParameterizedConstructor: >- case IProblem.JavadocParameterizedConstructorArgumentTypeMismatch: >- case IProblem.JavadocTypeArgumentsForRawGenericConstructor: > case IProblem.JavadocEmptyReturnTag: > if (!this.options.reportInvalidJavadocTags) { > return ProblemSeverities.Ignore; >@@ -1309,31 +1083,6 @@ > location.sourceStart, > nodeSourceEnd(null, location)); > } >-public void disallowedTargetForAnnotation(Annotation annotation) { >- this.handle( >- IProblem.DisallowedTargetForAnnotation, >- new String[] {new String(annotation.resolvedType.readableName())}, >- new String[] {new String(annotation.resolvedType.shortReadableName())}, >- annotation.sourceStart, >- annotation.sourceEnd); >-} >-public void duplicateAnnotation(Annotation annotation) { >- this.handle( >- IProblem.DuplicateAnnotation, >- new String[] {new String(annotation.resolvedType.readableName())}, >- new String[] {new String(annotation.resolvedType.shortReadableName())}, >- annotation.sourceStart, >- annotation.sourceEnd); >-} >-public void duplicateAnnotationValue(TypeBinding annotationType, MemberValuePair memberValuePair) { >- String name = new String(memberValuePair.name); >- this.handle( >- IProblem.DuplicateAnnotationMember, >- new String[] { name, new String(annotationType.readableName())}, >- new String[] { name, new String(annotationType.shortReadableName())}, >- memberValuePair.sourceStart, >- memberValuePair.sourceEnd); >-} > public void duplicateBounds(ASTNode location, TypeBinding type) { > this.handle( > IProblem.DuplicateBounds, >@@ -1358,22 +1107,6 @@ > statement.sourceStart, > statement.sourceEnd); > } >- >-public void duplicateEnumSpecialMethod(SourceTypeBinding type, AbstractMethodDeclaration methodDecl) { >- MethodBinding method = methodDecl.binding; >- this.handle( >- IProblem.CannotDeclareEnumSpecialMethod, >- new String[] { >- new String(methodDecl.getSafeName()), >- new String(method.declaringClass.readableName()), >- typesAsString(method.isVarargs(), method.parameters, false)}, >- new String[] { >- new String(methodDecl.getSafeName()), >- new String(method.declaringClass.shortReadableName()), >- typesAsString(method.isVarargs(), method.parameters, true)}, >- methodDecl.sourceStart, >- methodDecl.sourceEnd); >-} > public void duplicateFieldInType(SourceTypeBinding type, FieldDeclaration fieldDecl) { > this.handle( > IProblem.DuplicateField, >@@ -1549,16 +1282,6 @@ > reference.sourceStart, > reference.sourceEnd); > } >-public void duplicateTargetInTargetAnnotation(TypeBinding annotationType, NameReference reference) { >- FieldBinding field = reference.fieldBinding(); >- String name = new String(field.name); >- this.handle( >- IProblem.DuplicateTargetInTargetAnnotation, >- new String[] { name, new String(annotationType.readableName())}, >- new String[] { name, new String(annotationType.shortReadableName())}, >- nodeSourceStart(field, reference), >- nodeSourceEnd(field, reference)); >-} > public void duplicateTypeParameterInType(TypeParameter typeParameter) { > this.handle( > IProblem.DuplicateTypeVariable, >@@ -1597,28 +1320,6 @@ > sourceStart, > sourceEnd); > } >-public void enumAbstractMethodMustBeImplemented(AbstractMethodDeclaration method) { >- MethodBinding abstractMethod = method.binding; >- char[] methodSelector = abstractMethod.selector; >- if(methodSelector == null) >- methodSelector = method.getSafeName(); >- this.handle( >- // Must implement the inherited abstract method %1 >- // 8.4.3 - Every non-abstract subclass of an abstract type, A, must provide a concrete implementation of all of A's methods. >- IProblem.EnumAbstractMethodMustBeImplemented, >- new String[] { >- new String(methodSelector), >- typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), >- new String(abstractMethod.declaringClass.readableName()), >- }, >- new String[] { >- new String(methodSelector), >- typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), >- new String(abstractMethod.declaringClass.shortReadableName()), >- }, >- method.sourceStart(), >- method.sourceEnd()); >-} > public void enumConstantsCannotBeSurroundedByParenthesis(Expression expression) { > this.handle( > IProblem.EnumConstantsCannotBeSurroundedByParenthesis, >@@ -1627,22 +1328,6 @@ > expression.sourceStart, > expression.sourceEnd); > } >-public void enumStaticFieldUsedDuringInitialization(FieldBinding field, ASTNode location) { >- this.handle( >- IProblem.EnumStaticFieldInInInitializerContext, >- new String[] {new String(field.declaringClass.readableName()), new String(field.name)}, >- new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)}, >- nodeSourceStart(field, location), >- nodeSourceEnd(field, location)); >-} >-public void enumSwitchCannotTargetField(Reference reference, FieldBinding field) { >- this.handle( >- IProblem.EnumSwitchCannotTargetField, >- new String[]{ String.valueOf(field.declaringClass.readableName()), String.valueOf(field.name) }, >- new String[]{ String.valueOf(field.declaringClass.shortReadableName()), String.valueOf(field.name) }, >- nodeSourceStart(field, reference), >- nodeSourceEnd(field, reference)); >-} > public void errorNoMethodFor(MessageSend messageSend, TypeBinding recType, TypeBinding[] params) { > StringBuffer buffer = new StringBuffer(); > StringBuffer shortBuffer = new StringBuffer(); >@@ -1975,22 +1660,6 @@ > location.sourceStart, > location.sourceEnd); > } >-public void illegalExtendedDimensions(AnnotationMethodDeclaration annotationTypeMemberDeclaration) { >- this.handle( >- IProblem.IllegalExtendedDimensions, >- NoArgument, >- NoArgument, >- annotationTypeMemberDeclaration.sourceStart, >- annotationTypeMemberDeclaration.sourceEnd); >-} >-public void illegalExtendedDimensions(Argument argument) { >- this.handle( >- IProblem.IllegalExtendedDimensionsForVarArgs, >- NoArgument, >- NoArgument, >- argument.sourceStart, >- argument.sourceEnd); >-} > public void illegalGenericArray(TypeBinding leafComponentType, ASTNode location) { > this.handle( > IProblem.IllegalGenericArray, >@@ -1999,23 +1668,6 @@ > location.sourceStart, > location.sourceEnd); > } >-public void illegalInstanceOfGenericType(TypeBinding checkedType, ASTNode location) { >- if (checkedType.isTypeVariable()) { >- this.handle( >- IProblem.IllegalInstanceofTypeParameter, >- new String[] { new String(checkedType.readableName()), new String(checkedType.erasure().readableName())}, >- new String[] { new String(checkedType.shortReadableName()), new String(checkedType.erasure().shortReadableName())}, >- location.sourceStart, >- location.sourceEnd); >- return; >- } >- this.handle( >- IProblem.IllegalInstanceofParameterizedType, >- new String[] { new String(checkedType.readableName()), new String(checkedType.erasure().sourceName())}, >- new String[] { new String(checkedType.shortReadableName()), new String(checkedType.erasure().sourceName())}, >- location.sourceStart, >- location.sourceEnd); >-} > public void illegalLocalTypeDeclaration(TypeDeclaration typeDeclaration) { > if (isRecoveredName(typeDeclaration.name)) return; > >@@ -2056,53 +1708,6 @@ > fieldDecl.sourceStart, > fieldDecl.sourceEnd); > } >-public void illegalModifierForAnnotationField(FieldDeclaration fieldDecl) { >- String name = new String(fieldDecl.name); >- this.handle( >- IProblem.IllegalModifierForAnnotationField, >- new String[] { >- new String(fieldDecl.binding.declaringClass.readableName()), >- name, >- }, >- new String[] { >- new String(fieldDecl.binding.declaringClass.shortReadableName()), >- name, >- }, >- fieldDecl.sourceStart, >- fieldDecl.sourceEnd); >-} >-public void illegalModifierForAnnotationMember(AbstractMethodDeclaration methodDecl) { >- this.handle( >- IProblem.IllegalModifierForAnnotationMethod, >- new String[] { >- new String(methodDecl.binding.declaringClass.readableName()), >- new String(methodDecl.getSafeName()), >- }, >- new String[] { >- new String(methodDecl.binding.declaringClass.shortReadableName()), >- new String(methodDecl.getSafeName()), >- }, >- methodDecl.sourceStart, >- methodDecl.sourceEnd); >-} >-public void illegalModifierForAnnotationMemberType(SourceTypeBinding type) { >- String[] arguments = new String[] {new String(type.sourceName())}; >- this.handle( >- IProblem.IllegalModifierForAnnotationMemberType, >- arguments, >- arguments, >- type.sourceStart(), >- type.sourceEnd()); >-} >-public void illegalModifierForAnnotationType(SourceTypeBinding type) { >- String[] arguments = new String[] {new String(type.sourceName())}; >- this.handle( >- IProblem.IllegalModifierForAnnotationType, >- arguments, >- arguments, >- type.sourceStart(), >- type.sourceEnd()); >-} > public void illegalModifierForClass(SourceTypeBinding type) { > String[] arguments = new String[] {new String(type.sourceName())}; > this.handle( >@@ -2112,33 +1717,6 @@ > type.sourceStart(), > type.sourceEnd()); > } >-public void illegalModifierForEnum(SourceTypeBinding type) { >- String[] arguments = new String[] {new String(type.sourceName())}; >- this.handle( >- IProblem.IllegalModifierForEnum, >- arguments, >- arguments, >- type.sourceStart(), >- type.sourceEnd()); >-} >-public void illegalModifierForEnumConstant(ReferenceBinding type, FieldDeclaration fieldDecl) { >- String[] arguments = new String[] {new String(fieldDecl.name)}; >- this.handle( >- IProblem.IllegalModifierForEnumConstant, >- arguments, >- arguments, >- fieldDecl.sourceStart, >- fieldDecl.sourceEnd); >-} >- >-public void illegalModifierForEnumConstructor(AbstractMethodDeclaration constructor) { >- this.handle( >- IProblem.IllegalModifierForEnumConstructor, >- NoArgument, >- NoArgument, >- constructor.sourceStart, >- constructor.sourceEnd); >-} > public void illegalModifierForField(ReferenceBinding type, FieldDeclaration fieldDecl) { > String[] arguments = new String[] {new String(fieldDecl.name)}; > this.handle( >@@ -2198,15 +1776,6 @@ > type.sourceStart(), > type.sourceEnd()); > } >-public void illegalModifierForLocalEnum(SourceTypeBinding type) { >- String[] arguments = new String[] {new String(type.sourceName())}; >- this.handle( >- IProblem.IllegalModifierForLocalEnum, >- arguments, >- arguments, >- type.sourceStart(), >- type.sourceEnd()); >-} > public void illegalModifierForMemberClass(SourceTypeBinding type) { > String[] arguments = new String[] {new String(type.sourceName())}; > this.handle( >@@ -2216,15 +1785,6 @@ > type.sourceStart(), > type.sourceEnd()); > } >-public void illegalModifierForMemberEnum(SourceTypeBinding type) { >- String[] arguments = new String[] {new String(type.sourceName())}; >- this.handle( >- IProblem.IllegalModifierForMemberEnum, >- arguments, >- arguments, >- type.sourceStart(), >- type.sourceEnd()); >-} > public void illegalModifierForMemberInterface(SourceTypeBinding type) { > String[] arguments = new String[] {new String(type.sourceName())}; > this.handle( >@@ -2720,23 +2280,6 @@ > fieldDecl.sourceStart, > fieldDecl.sourceEnd); > } >-public void invalidAnnotationMemberType(MethodDeclaration methodDecl) { >- this.handle( >- IProblem.InvalidAnnotationMemberType, >- new String[] { >- new String(methodDecl.binding.returnType.readableName()), >- new String(methodDecl.getSafeName()), >- new String(methodDecl.binding.declaringClass.readableName()), >- }, >- new String[] { >- new String(methodDecl.binding.returnType.shortReadableName()), >- new String(methodDecl.getSafeName()), >- new String(methodDecl.binding.declaringClass.shortReadableName()), >- }, >- methodDecl.returnType.sourceStart, >- methodDecl.returnType.sourceEnd); >- >-} > public void invalidBreak(ASTNode location) { > this.handle( > IProblem.InvalidBreak, >@@ -2797,112 +2340,7 @@ > id = IProblem.AmbiguousConstructor; > } > break; >- case ProblemReasons.ParameterBoundMismatch : >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- ParameterizedGenericMethodBinding substitutedConstructor = (ParameterizedGenericMethodBinding) problemConstructor.closestMatch; >- shownConstructor = substitutedConstructor.original(); >- int augmentedLength = problemConstructor.parameters.length; >- TypeBinding inferredTypeArgument = problemConstructor.parameters[augmentedLength-2]; >- TypeVariableBinding typeParameter = (TypeVariableBinding) problemConstructor.parameters[augmentedLength-1]; >- TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end >- System.arraycopy(problemConstructor.parameters, 0, invocationArguments, 0, augmentedLength-2); >- this.handle( >- IProblem.GenericConstructorTypeArgumentMismatch, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(false, invocationArguments, false), >- new String(inferredTypeArgument.readableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(false, invocationArguments, true), >- new String(inferredTypeArgument.shortReadableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, true) }, >- sourceStart, >- sourceEnd); >- return; > >- case ProblemReasons.TypeParameterArityMismatch : >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- shownConstructor = problemConstructor.closestMatch; >- if (shownConstructor.typeVariables == Binding.NO_TYPE_VARIABLES) { >- this.handle( >- IProblem.NonGenericConstructor, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- sourceStart, >- sourceEnd); >- } else { >- this.handle( >- IProblem.IncorrectArityForParameterizedConstructor , >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(false, shownConstructor.typeVariables, false), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(false, shownConstructor.typeVariables, true), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- sourceStart, >- sourceEnd); >- } >- return; >- case ProblemReasons.ParameterizedMethodTypeMismatch : >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- shownConstructor = problemConstructor.closestMatch; >- this.handle( >- IProblem.ParameterizedConstructorArgumentTypeMismatch, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownConstructor).typeArguments, false), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownConstructor).typeArguments, true), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- sourceStart, >- sourceEnd); >- return; >- case ProblemReasons.TypeArgumentsForRawGenericMethod : >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- shownConstructor = problemConstructor.closestMatch; >- this.handle( >- IProblem.TypeArgumentsForRawGenericConstructor, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- sourceStart, >- sourceEnd); >- return; > case ProblemReasons.NoError : // 0 > default : > needImplementation(); // want to fail to see why we were here... >@@ -3163,14 +2601,6 @@ > nameRef.sourceStart, > (int) nameRef.sourcePositions[index]); > } >-public void invalidFileNameForPackageAnnotations(Annotation annotation) { >- this.handle( >- IProblem.InvalidFileNameForPackageAnnotations, >- NoArgument, >- NoArgument, >- annotation.sourceStart, >- annotation.sourceEnd); >-} > public void invalidMethod(MessageSend messageSend, MethodBinding method) { > if (isRecoveredName(messageSend.selector)) return; > >@@ -3237,111 +2667,6 @@ > messageSend.receiver.sourceStart, > messageSend.receiver.sourceEnd); > return; >- case ProblemReasons.ParameterBoundMismatch : >- problemMethod = (ProblemMethodBinding) method; >- ParameterizedGenericMethodBinding substitutedMethod = (ParameterizedGenericMethodBinding) problemMethod.closestMatch; >- shownMethod = substitutedMethod.original(); >- int augmentedLength = problemMethod.parameters.length; >- TypeBinding inferredTypeArgument = problemMethod.parameters[augmentedLength-2]; >- TypeVariableBinding typeParameter = (TypeVariableBinding) problemMethod.parameters[augmentedLength-1]; >- TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end >- System.arraycopy(problemMethod.parameters, 0, invocationArguments, 0, augmentedLength-2); >- this.handle( >- IProblem.GenericMethodTypeArgumentMismatch, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(false, invocationArguments, false), >- new String(inferredTypeArgument.readableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(false, invocationArguments, true), >- new String(inferredTypeArgument.shortReadableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, true) }, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- return; >- case ProblemReasons.TypeParameterArityMismatch : >- problemMethod = (ProblemMethodBinding) method; >- shownMethod = problemMethod.closestMatch; >- if (shownMethod.typeVariables == Binding.NO_TYPE_VARIABLES) { >- this.handle( >- IProblem.NonGenericMethod , >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- } else { >- this.handle( >- IProblem.IncorrectArityForParameterizedMethod , >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(false, shownMethod.typeVariables, false), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(false, shownMethod.typeVariables, true), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- } >- return; >- case ProblemReasons.ParameterizedMethodTypeMismatch : >- problemMethod = (ProblemMethodBinding) method; >- shownMethod = problemMethod.closestMatch; >- this.handle( >- IProblem.ParameterizedMethodArgumentTypeMismatch, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownMethod).typeArguments, false), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownMethod).typeArguments, true), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- return; >- case ProblemReasons.TypeArgumentsForRawGenericMethod : >- problemMethod = (ProblemMethodBinding) method; >- shownMethod = problemMethod.closestMatch; >- this.handle( >- IProblem.TypeArgumentsForRawGenericMethod , >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- return; > case ProblemReasons.NoError : // 0 > default : > needImplementation(); // want to fail to see why we were here... >@@ -3602,30 +2927,6 @@ > expression.sourceStart, > expression.sourceEnd); > } >-public void invalidUsageOfAnnotation(Annotation annotation) { >- this.handle( >- IProblem.InvalidUsageOfAnnotations, >- NoArgument, >- NoArgument, >- annotation.sourceStart, >- annotation.sourceEnd); >-} >-public void invalidUsageOfAnnotationDeclarations(TypeDeclaration annotationTypeDeclaration) { >- this.handle( >- IProblem.InvalidUsageOfAnnotationDeclarations, >- NoArgument, >- NoArgument, >- annotationTypeDeclaration.sourceStart, >- annotationTypeDeclaration.sourceEnd); >-} >-public void invalidUsageOfEnumDeclarations(TypeDeclaration enumDeclaration) { >- this.handle( >- IProblem.InvalidUsageOfEnumDeclarations, >- NoArgument, >- NoArgument, >- enumDeclaration.sourceStart, >- enumDeclaration.sourceEnd); >-} > public void invalidUsageOfForeachStatements(LocalDeclaration elementVariable, Expression collection) { > this.handle( > IProblem.InvalidUsageOfForeachStatements, >@@ -3634,22 +2935,6 @@ > elementVariable.declarationSourceStart, > collection.sourceEnd); > } >-public void invalidUsageOfStaticImports(ImportReference staticImport) { >- this.handle( >- IProblem.InvalidUsageOfStaticImports, >- NoArgument, >- NoArgument, >- staticImport.declarationSourceStart, >- staticImport.declarationSourceEnd); >-} >-public void invalidUsageOfTypeArguments(TypeReference firstTypeReference, TypeReference lastTypeReference) { >- this.handle( >- IProblem.InvalidUsageOfTypeArguments, >- NoArgument, >- NoArgument, >- firstTypeReference.sourceStart, >- lastTypeReference.sourceEnd); >-} > public void invalidUsageOfTypeParameters(TypeParameter firstTypeParameter, TypeParameter lastTypeParameter) { > this.handle( > IProblem.InvalidUsageOfTypeParameters, >@@ -3658,22 +2943,6 @@ > firstTypeParameter.declarationSourceStart, > lastTypeParameter.declarationSourceEnd); > } >-public void invalidUsageOfVarargs(Argument argument) { >- this.handle( >- IProblem.InvalidUsageOfVarargs, >- NoArgument, >- NoArgument, >- argument.type.sourceStart, >- argument.sourceEnd); >-} >-public void illegalUsageOfWildcard(TypeReference wildcard) { >- this.handle( >- IProblem.InvalidUsageOfWildcard, >- NoArgument, >- NoArgument, >- wildcard.sourceStart, >- wildcard.sourceEnd); >-} > public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location) { > this.referenceContext = compUnitDecl; > String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)}; >@@ -3944,18 +3213,7 @@ > public void javadocInvalidConstructor(Statement statement, MethodBinding targetConstructor, int modifiers) { > > if (!javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) return; >- int sourceStart = statement.sourceStart; >- int sourceEnd = statement.sourceEnd; >- if (statement instanceof AllocationExpression) { >- AllocationExpression allocation = (AllocationExpression)statement; >- if (allocation.enumConstant != null) { >- sourceStart = allocation.enumConstant.sourceStart; >- sourceEnd = allocation.enumConstant.sourceEnd; >- } >- } > int id = IProblem.JavadocUndefinedConstructor; //default... >- ProblemMethodBinding problemConstructor = null; >- MethodBinding shownConstructor = null; > switch (targetConstructor.problemId()) { > case ProblemReasons.NotFound : > id = IProblem.JavadocUndefinedConstructor; >@@ -3966,128 +3224,6 @@ > case ProblemReasons.Ambiguous : > id = IProblem.JavadocAmbiguousConstructor; > break; >- case ProblemReasons.ParameterBoundMismatch : >- int severity = computeSeverity(IProblem.JavadocGenericConstructorTypeArgumentMismatch); >- if (severity == ProblemSeverities.Ignore) return; >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- ParameterizedGenericMethodBinding substitutedConstructor = (ParameterizedGenericMethodBinding) problemConstructor.closestMatch; >- shownConstructor = substitutedConstructor.original(); >- >- int augmentedLength = problemConstructor.parameters.length; >- TypeBinding inferredTypeArgument = problemConstructor.parameters[augmentedLength-2]; >- TypeVariableBinding typeParameter = (TypeVariableBinding) problemConstructor.parameters[augmentedLength-1]; >- TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end >- System.arraycopy(problemConstructor.parameters, 0, invocationArguments, 0, augmentedLength-2); >- >- this.handle( >- IProblem.JavadocGenericConstructorTypeArgumentMismatch, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(false, invocationArguments, false), >- new String(inferredTypeArgument.readableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(false, invocationArguments, true), >- new String(inferredTypeArgument.shortReadableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, true) }, >- severity, >- sourceStart, >- sourceEnd); >- return; >- >- case ProblemReasons.TypeParameterArityMismatch : >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- shownConstructor = problemConstructor.closestMatch; >- boolean noTypeVariables = shownConstructor.typeVariables == Binding.NO_TYPE_VARIABLES; >- severity = computeSeverity(noTypeVariables ? IProblem.JavadocNonGenericConstructor : IProblem.JavadocIncorrectArityForParameterizedConstructor); >- if (severity == ProblemSeverities.Ignore) return; >- if (noTypeVariables) { >- this.handle( >- IProblem.JavadocNonGenericConstructor, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- severity, >- sourceStart, >- sourceEnd); >- } else { >- this.handle( >- IProblem.JavadocIncorrectArityForParameterizedConstructor, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(false, shownConstructor.typeVariables, false), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(false, shownConstructor.typeVariables, true), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- severity, >- sourceStart, >- sourceEnd); >- } >- return; >- case ProblemReasons.ParameterizedMethodTypeMismatch : >- severity = computeSeverity(IProblem.JavadocParameterizedConstructorArgumentTypeMismatch); >- if (severity == ProblemSeverities.Ignore) return; >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- shownConstructor = problemConstructor.closestMatch; >- this.handle( >- IProblem.JavadocParameterizedConstructorArgumentTypeMismatch, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownConstructor).typeArguments, false), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownConstructor).typeArguments, true), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- severity, >- sourceStart, >- sourceEnd); >- return; >- case ProblemReasons.TypeArgumentsForRawGenericMethod : >- severity = computeSeverity(IProblem.JavadocTypeArgumentsForRawGenericConstructor); >- if (severity == ProblemSeverities.Ignore) return; >- problemConstructor = (ProblemMethodBinding) targetConstructor; >- shownConstructor = problemConstructor.closestMatch; >- this.handle( >- IProblem.JavadocTypeArgumentsForRawGenericConstructor, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), >- new String(shownConstructor.declaringClass.readableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, false) }, >- new String[] { >- new String(shownConstructor.declaringClass.sourceName()), >- typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), >- new String(shownConstructor.declaringClass.shortReadableName()), >- typesAsString(targetConstructor.isVarargs(), targetConstructor.parameters, true) }, >- severity, >- sourceStart, >- sourceEnd); >- return; > case ProblemReasons.NoError : // 0 > default : > needImplementation(); // want to fail to see why we were here... >@@ -4200,125 +3336,6 @@ > case ProblemReasons.Ambiguous : > id = IProblem.JavadocAmbiguousMethod; > break; >- case ProblemReasons.ParameterBoundMismatch : >- int severity = computeSeverity(IProblem.JavadocGenericMethodTypeArgumentMismatch); >- if (severity == ProblemSeverities.Ignore) return; >- problemMethod = (ProblemMethodBinding) method; >- ParameterizedGenericMethodBinding substitutedMethod = (ParameterizedGenericMethodBinding) problemMethod.closestMatch; >- shownMethod = substitutedMethod.original(); >- int augmentedLength = problemMethod.parameters.length; >- TypeBinding inferredTypeArgument = problemMethod.parameters[augmentedLength-2]; >- TypeVariableBinding typeParameter = (TypeVariableBinding) problemMethod.parameters[augmentedLength-1]; >- TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end >- System.arraycopy(problemMethod.parameters, 0, invocationArguments, 0, augmentedLength-2); >- this.handle( >- IProblem.JavadocGenericMethodTypeArgumentMismatch, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(false, invocationArguments, false), >- new String(inferredTypeArgument.readableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(false, invocationArguments, true), >- new String(inferredTypeArgument.shortReadableName()), >- new String(typeParameter.sourceName), >- parameterBoundAsString(typeParameter, true) }, >- severity, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- return; >- case ProblemReasons.TypeParameterArityMismatch : >- problemMethod = (ProblemMethodBinding) method; >- shownMethod = problemMethod.closestMatch; >- boolean noTypeVariables = shownMethod.typeVariables == Binding.NO_TYPE_VARIABLES; >- severity = computeSeverity(noTypeVariables ? IProblem.JavadocNonGenericMethod : IProblem.JavadocIncorrectArityForParameterizedMethod); >- if (severity == ProblemSeverities.Ignore) return; >- if (noTypeVariables) { >- this.handle( >- IProblem.JavadocNonGenericMethod, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- severity, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- } else { >- this.handle( >- IProblem.JavadocIncorrectArityForParameterizedMethod, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(false, shownMethod.typeVariables, false), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(false, shownMethod.typeVariables, true), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- severity, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- } >- return; >- case ProblemReasons.ParameterizedMethodTypeMismatch : >- severity = computeSeverity(IProblem.JavadocParameterizedMethodArgumentTypeMismatch); >- if (severity == ProblemSeverities.Ignore) return; >- problemMethod = (ProblemMethodBinding) method; >- shownMethod = problemMethod.closestMatch; >- this.handle( >- IProblem.JavadocParameterizedMethodArgumentTypeMismatch, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownMethod).typeArguments, false), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(false, ((ParameterizedGenericMethodBinding)shownMethod).typeArguments, true), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- severity, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- return; >- case ProblemReasons.TypeArgumentsForRawGenericMethod : >- severity = computeSeverity(IProblem.JavadocTypeArgumentsForRawGenericMethod); >- if (severity == ProblemSeverities.Ignore) return; >- problemMethod = (ProblemMethodBinding) method; >- shownMethod = problemMethod.closestMatch; >- this.handle( >- IProblem.JavadocTypeArgumentsForRawGenericMethod, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), >- new String(shownMethod.declaringClass.readableName()), >- typesAsString(method.isVarargs(), method.parameters, false) }, >- new String[] { >- new String(shownMethod.selector), >- typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), >- new String(shownMethod.declaringClass.shortReadableName()), >- typesAsString(method.isVarargs(), method.parameters, true) }, >- severity, >- (int) (messageSend.nameSourcePosition >>> 32), >- (int) messageSend.nameSourcePosition); >- return; > case ProblemReasons.NoError : // 0 > default : > needImplementation(); // want to fail to see why we were here... >@@ -4700,19 +3717,6 @@ > nodeSourceStart(local, location), > nodeSourceEnd(local, location)); > } >-public void methodMustOverride(AbstractMethodDeclaration method) { >- MethodBinding binding = method.binding; >- char[] methodSelector = binding.selector; >- if(methodSelector == null) >- methodSelector = method.getSafeName(); >- >- this.handle( >- this.options.sourceLevel == ClassFileConstants.JDK1_5 ? IProblem.MethodMustOverride : IProblem.MethodMustOverrideOrImplement, >- new String[] {new String(methodSelector), typesAsString(binding.isVarargs(), binding.parameters, false), new String(binding.declaringClass.readableName()), }, >- new String[] {new String(methodSelector), typesAsString(binding.isVarargs(), binding.parameters, true), new String(binding.declaringClass.shortReadableName()),}, >- method.sourceStart, >- method.sourceEnd); >-} > public void methodNameClash(MethodBinding currentMethod, MethodBinding inheritedMethod) { > this.handle( > IProblem.MethodNameClash, >@@ -4758,70 +3762,6 @@ > methodDecl.sourceStart, > methodDecl.sourceEnd); > } >-public void missingDeprecatedAnnotationForField(FieldDeclaration field) { >- int severity = computeSeverity(IProblem.FieldMissingDeprecatedAnnotation); >- if (severity == ProblemSeverities.Ignore) return; >- FieldBinding binding = field.binding; >- this.handle( >- IProblem.FieldMissingDeprecatedAnnotation, >- new String[] {new String(binding.declaringClass.readableName()), new String(binding.name), }, >- new String[] {new String(binding.declaringClass.shortReadableName()), new String(binding.name), }, >- severity, >- nodeSourceStart(binding, field), >- nodeSourceEnd(binding, field)); >-} >-public void missingDeprecatedAnnotationForMethod(AbstractMethodDeclaration method) { >- int severity = computeSeverity(IProblem.MethodMissingDeprecatedAnnotation); >- if (severity == ProblemSeverities.Ignore) return; >- MethodBinding binding = method.binding; >- char[] methodSelector = binding.selector; >- if(methodSelector == null) >- methodSelector = method.getSafeName(); >- >- this.handle( >- IProblem.MethodMissingDeprecatedAnnotation, >- new String[] {new String(methodSelector), typesAsString(binding.isVarargs(), binding.parameters, false), new String(binding.declaringClass.readableName()), }, >- new String[] {new String(methodSelector), typesAsString(binding.isVarargs(), binding.parameters, true), new String(binding.declaringClass.shortReadableName()),}, >- severity, >- method.sourceStart, >- method.sourceEnd); >-} >-public void missingDeprecatedAnnotationForType(TypeDeclaration type) { >- int severity = computeSeverity(IProblem.TypeMissingDeprecatedAnnotation); >- if (severity == ProblemSeverities.Ignore) return; >- TypeBinding binding = type.binding; >- this.handle( >- IProblem.TypeMissingDeprecatedAnnotation, >- new String[] {new String(binding.readableName()), }, >- new String[] {new String(binding.shortReadableName()),}, >- severity, >- type.sourceStart, >- type.sourceEnd); >-} >-public void missingEnumConstantCase(SwitchStatement switchStatement, FieldBinding enumConstant) { >- this.handle( >- IProblem.MissingEnumConstantCase, >- new String[] {new String(enumConstant.declaringClass.readableName()), new String(enumConstant.name) }, >- new String[] {new String(enumConstant.declaringClass.shortReadableName()), new String(enumConstant.name) }, >- switchStatement.expression.sourceStart, >- switchStatement.expression.sourceEnd); >-} >-public void missingOverrideAnnotation(AbstractMethodDeclaration method) { >- int severity = computeSeverity(IProblem.MissingOverrideAnnotation); >- if (severity == ProblemSeverities.Ignore) return; >- MethodBinding binding = method.binding; >- char[] methodSelector = binding.selector; >- if(methodSelector == null) >- methodSelector = method.getSafeName(); >- >- this.handle( >- IProblem.MissingOverrideAnnotation, >- new String[] {new String(methodSelector), typesAsString(binding.isVarargs(), binding.parameters, false), new String(binding.declaringClass.readableName()), }, >- new String[] {new String(methodSelector), typesAsString(binding.isVarargs(), binding.parameters, true), new String(binding.declaringClass.shortReadableName()),}, >- severity, >- method.sourceStart, >- method.sourceEnd); >-} > public void missingReturnType(AbstractMethodDeclaration methodDecl) { > this.handle( > IProblem.MissingReturnType, >@@ -4848,15 +3788,6 @@ > typeDecl.sourceStart, > typeDecl.sourceEnd); > } >-public void missingValueForAnnotationMember(Annotation annotation, char[] memberName) { >- String memberString = new String(memberName); >- this.handle( >- IProblem.MissingValueForAnnotationMember, >- new String[] {new String(annotation.resolvedType.readableName()), memberString }, >- new String[] {new String(annotation.resolvedType.shortReadableName()), memberString}, >- annotation.sourceStart, >- annotation.sourceEnd); >-} > public void mustDefineDimensionsOrInitializer(ArrayAllocationExpression expression) { > this.handle( > IProblem.MustDefineEitherDimensionExpressionsOrInitializer, >@@ -5208,14 +4139,6 @@ > expression.sourceStart, > expression.sourceEnd); > } >-public void objectCannotBeGeneric(TypeDeclaration typeDecl) { >- this.handle( >- IProblem.ObjectCannotBeGeneric, >- NoArgument, >- NoArgument, >- typeDecl.typeParameters[0].sourceStart, >- typeDecl.typeParameters[typeDecl.typeParameters.length-1].sourceEnd); >-} > public void objectCannotHaveSuperTypes(SourceTypeBinding type) { > this.handle( > IProblem.ObjectCannotHaveSuperTypes, >@@ -6015,18 +4938,6 @@ > decl.sourceStart, > decl.sourceEnd); > } >-public void superTypeCannotUseWildcard(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) { >- String name = new String(type.sourceName()); >- String superTypeFullName = new String(superTypeBinding.readableName()); >- String superTypeShortName = new String(superTypeBinding.shortReadableName()); >- if (superTypeShortName.equals(name)) superTypeShortName = superTypeFullName; >- this.handle( >- IProblem.SuperTypeUsingWildcard, >- new String[] {superTypeFullName, name}, >- new String[] {superTypeShortName, name}, >- superclass.sourceStart, >- superclass.sourceEnd); >-} > private void syntaxError( > int id, > int startPosition, >@@ -6130,42 +5041,6 @@ > typeDecl.sourceEnd, > compUnitDecl.compilationResult); > } >-public void typeHiding(TypeDeclaration typeDecl, TypeVariableBinding hiddenTypeParameter) { >- int severity = computeSeverity(IProblem.TypeHidingTypeParameterFromType); >- if (severity == ProblemSeverities.Ignore) return; >- if (hiddenTypeParameter.declaringElement instanceof TypeBinding) { >- TypeBinding declaringType = (TypeBinding) hiddenTypeParameter.declaringElement; >- this.handle( >- IProblem.TypeHidingTypeParameterFromType, >- new String[] { new String(typeDecl.name) , new String(hiddenTypeParameter.readableName()), new String(declaringType.readableName()) }, >- new String[] { new String(typeDecl.name) , new String(hiddenTypeParameter.shortReadableName()), new String(declaringType.shortReadableName()) }, >- severity, >- typeDecl.sourceStart, >- typeDecl.sourceEnd); >- } else { >- // type parameter of generic method >- MethodBinding declaringMethod = (MethodBinding) hiddenTypeParameter.declaringElement; >- this.handle( >- IProblem.TypeHidingTypeParameterFromMethod, >- new String[] { >- new String(typeDecl.name), >- new String(hiddenTypeParameter.readableName()), >- new String(declaringMethod.selector), >- typesAsString(declaringMethod.isVarargs(), declaringMethod.parameters, false), >- new String(declaringMethod.declaringClass.readableName()), >- }, >- new String[] { >- new String(typeDecl.name), >- new String(hiddenTypeParameter.shortReadableName()), >- new String(declaringMethod.selector), >- typesAsString(declaringMethod.isVarargs(), declaringMethod.parameters, true), >- new String(declaringMethod.declaringClass.shortReadableName()), >- }, >- severity, >- typeDecl.sourceStart, >- typeDecl.sourceEnd); >- } >-} > public void typeHiding(TypeDeclaration typeDecl, TypeBinding hiddenType) { > int severity = computeSeverity(IProblem.TypeHidingType); > if (severity == ProblemSeverities.Ignore) return; >@@ -6197,24 +5072,6 @@ > location.sourceStart, > location.sourceEnd); > } >-public void typeMismatchError(TypeBinding typeArgument, TypeVariableBinding typeParameter, ReferenceBinding genericType, ASTNode location) { >- if (location == null) { // binary case >- this.handle( >- IProblem.TypeArgumentMismatch, >- new String[] { new String(typeArgument.readableName()), new String(genericType.readableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, false) }, >- new String[] { new String(typeArgument.shortReadableName()), new String(genericType.shortReadableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, true) }, >- ProblemSeverities.AbortCompilation | ProblemSeverities.Error | ProblemSeverities.Fatal, >- 0, >- 0); >- return; >- } >- this.handle( >- IProblem.TypeArgumentMismatch, >- new String[] { new String(typeArgument.readableName()), new String(genericType.readableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, false) }, >- new String[] { new String(typeArgument.shortReadableName()), new String(genericType.shortReadableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, true) }, >- location.sourceStart, >- location.sourceEnd); >-} > private String typesAsString(boolean isVarargs, TypeBinding[] types, boolean makeShort) { > StringBuffer buffer = new StringBuffer(10); > for (int i = 0, length = types.length; i < length; i++) { >@@ -6228,16 +5085,6 @@ > } > return buffer.toString(); > } >-public void undefinedAnnotationValue(TypeBinding annotationType, MemberValuePair memberValuePair) { >- if (isRecoveredName(memberValuePair.name)) return; >- String name = new String(memberValuePair.name); >- this.handle( >- IProblem.UndefinedAnnotationMember, >- new String[] { name, new String(annotationType.readableName())}, >- new String[] { name, new String(annotationType.shortReadableName())}, >- memberValuePair.sourceStart, >- memberValuePair.sourceEnd); >-} > public void undefinedLabel(BranchStatement statement) { > if (isRecoveredName(statement.label)) return; > String[] arguments = new String[] {new String(statement.label)}; >@@ -6304,15 +5151,6 @@ > location.sourceStart, > location.sourceEnd); > } >-public void unhandledWarningToken(Expression token) { >- String[] arguments = new String[] { token.constant.stringValue() }; >- this.handle( >- IProblem.UnhandledWarningToken, >- arguments, >- arguments, >- token.sourceStart, >- token.sourceEnd); >-} > public void uninitializedBlankFinalField(FieldBinding field, ASTNode location) { > String[] arguments = new String[] {new String(field.readableName())}; > this.handle( >@@ -6753,73 +5591,6 @@ > sourceStart, > sourceEnd); > } >-public void varargsArgumentNeedCast(MethodBinding method, TypeBinding argumentType, InvocationSite location) { >- int severity = this.options.getSeverity(CompilerOptions.VarargsArgumentNeedCast); >- if (severity == ProblemSeverities.Ignore) return; >- ArrayBinding varargsType = (ArrayBinding)method.parameters[method.parameters.length-1]; >- if (method.isConstructor()) { >- this.handle( >- IProblem.ConstructorVarargsArgumentNeedCast, >- new String[] { >- new String(argumentType.readableName()), >- new String(varargsType.readableName()), >- new String(method.declaringClass.readableName()), >- typesAsString(method.isVarargs(), method.parameters, false), >- new String(varargsType.elementsType().readableName()), >- }, >- new String[] { >- new String(argumentType.shortReadableName()), >- new String(varargsType.shortReadableName()), >- new String(method.declaringClass.shortReadableName()), >- typesAsString(method.isVarargs(), method.parameters, true), >- new String(varargsType.elementsType().shortReadableName()), >- }, >- severity, >- location.sourceStart(), >- location.sourceEnd()); >- } else { >- this.handle( >- IProblem.MethodVarargsArgumentNeedCast, >- new String[] { >- new String(argumentType.readableName()), >- new String(varargsType.readableName()), >- new String(method.selector), >- typesAsString(method.isVarargs(), method.parameters, false), >- new String(method.declaringClass.readableName()), >- new String(varargsType.elementsType().readableName()), >- }, >- new String[] { >- new String(argumentType.shortReadableName()), >- new String(varargsType.shortReadableName()), >- new String(method.selector), typesAsString(method.isVarargs(), method.parameters, true), >- new String(method.declaringClass.shortReadableName()), >- new String(varargsType.elementsType().shortReadableName()), >- }, >- severity, >- location.sourceStart(), >- location.sourceEnd()); >- } >-} >-public void varargsConflict(MethodBinding method1, MethodBinding method2, SourceTypeBinding type) { >- this.handle( >- IProblem.VarargsConflict, >- new String[] { >- new String(method1.selector), >- typesAsString(method1.isVarargs(), method1.parameters, false), >- new String(method1.declaringClass.readableName()), >- typesAsString(method2.isVarargs(), method2.parameters, false), >- new String(method2.declaringClass.readableName()) >- }, >- new String[] { >- new String(method1.selector), >- typesAsString(method1.isVarargs(), method1.parameters, true), >- new String(method1.declaringClass.shortReadableName()), >- typesAsString(method2.isVarargs(), method2.parameters, true), >- new String(method2.declaringClass.shortReadableName()) >- }, >- method1.declaringClass == type ? method1.sourceStart() : type.sourceStart(), >- method1.declaringClass == type ? method1.sourceEnd() : type.sourceEnd()); >-} > public void variableTypeCannotBeVoid(AbstractVariableDeclaration varDecl) { > String[] arguments = new String[] {new String(varDecl.name)}; > this.handle( >Index: src/org/eclipse/wst/jsdt/internal/compiler/problem/messages.properties >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/messages.properties,v >retrieving revision 1.15 >diff -u -r1.15 messages.properties >--- src/org/eclipse/wst/jsdt/internal/compiler/problem/messages.properties 30 Apr 2008 21:32:41 -0000 1.15 >+++ src/org/eclipse/wst/jsdt/internal/compiler/problem/messages.properties 6 Apr 2009 18:29:58 -0000 >@@ -127,7 +127,6 @@ > 150 = The type of the expression must be an array type but it resolved to {0} > 151 = Must explicitly convert the char[] to a String > 152 = String constant is exceeding the limit of 65535 bytes of UTF8 encoding >-153 = case expressions should be constant expressions > 154 = The literal {1} of type {0} is out of range > 156 = Cannot cast from {0} to {1} > 157 = Cannot instantiate the type {0} >@@ -257,17 +256,6 @@ > 329 = The type java.lang.Object cannot have a superclass or superinterfaces > 330 = The type java.lang.Object must be a class > >-###[obsolete] 330 = {0} cannot be resolved or is not a valid superclass >-###[obsolete] 331 = Superclass {0} is not visible >-###[obsolete] 332 = Superclass {0} is ambiguous >-###[obsolete] 333 = Superclass {0} cannot be referenced using its binary name >-###[obsolete] 334 = Superclass {0} is defined in an inherited type and an enclosing scope >-###[obsolete] 335 = {0} cannot be resolved or is not a valid superinterface >-###[obsolete] 336 = Superinterface {0} is not visible >-###[obsolete] 337 = Superinterface {0} is ambiguous >-###[obsolete] 338 = Superinterface {0} cannot be referenced using its binary name >-###[obsolete] 339 = Superinterface {0} is defined in an inherited type and an enclosing scope >- > 340 = Duplicate field {0}.{1} > 341 = Duplicate modifier for the field {0} > 342 = Illegal modifier for the field {0}; only public, protected, private, static, final, transient & volatile are permitted >@@ -276,12 +264,6 @@ > 345 = The field {0} can be either final or volatile, not both > 346 = The field {0} cannot be declared static; static fields can only be declared in static or top level types > >-###[obsolete] 350 = {2} cannot be resolved (or is not a valid type) for the field {1}.{0} >-###[obsolete] 351 = The type {2} is not visible for the field {1}.{0} >-###[obsolete] 352 = The type {2} is ambiguous for the field {1}.{0} >-###[obsolete] 353 = The field type {2} cannot be referenced using its binary name >-###[obsolete] 354 = The field type {2} is defined in an inherited type and an enclosing scope >- > 355 = Duplicate function {0}({2}) in type {1} > 356 = Illegal modifier for parameter {0}; only final is permitted > 357 = Duplicate modifier for the function {1} in type {0} >@@ -292,45 +274,19 @@ > 362 = The abstract function {1} in type {0} can only set a visibility modifier, one of public or protected > 363 = The abstract function {1} in type {0} can only be defined by an abstract class > 364 = void is an invalid type for the parameter {1} of the function {0} >-###[obsolete] 365 = An array of void is an invalid type for the parameter {1} of the function {0} >-###[obsolete] 366 = An array of void is an invalid return type for the function {0} > 367 = The native function {1} cannot also be declared strictfp > 368 = Duplicate modifier for parameter {0} > >-###[obsolete] 370 = {2} cannot be resolved (or is not a valid type) for the parameter {1} of the function {0} >-###[obsolete] 371 = The type {2} is not visible for the parameter {1} of the function {0} >-###[obsolete] 372 = The type {2} is ambiguous for the parameter {1} of the function {0} >-###[obsolete] 373 = The parameter type {2} cannot be referenced using its binary name >-###[obsolete] 374 = The parameter type {2} is defined in an inherited type and an enclosing scope >-###[obsolete] 375 = {1} cannot be resolved (or is not an exception type) for the function {0} >-###[obsolete] 376 = The exception type {1} is not visible for the function {0} >-###[obsolete] 377 = The exception type {1} is ambiguous for the function {0} >-###[obsolete] 378 = The exception type {1} cannot be referenced using its binary name >-###[obsolete] 379 = The exception type {1} is defined in an inherited type and an enclosing scope >-###[obsolete] 380 = {1} cannot be resolved (or is not a valid return type) for the function {0} >-###[obsolete] 381 = The return type {1} is not visible for the function {0} >-###[obsolete] 382 = The return type {1} is ambiguous for the function {0} >-###[obsolete] 383 = The return type {1} cannot be referenced using its binary name >-###[obsolete] 384 = The return type {1} is defined in an inherited type and an enclosing scope >- > 385 = The import {0} conflicts with a type defined in the same file > 386 = The import {0} collides with another import statement > 387 = Only a type can be imported. {0} resolves to a package > 388 = The import {0} is never used > 390 = The import {0} cannot be resolved > >-###[obsolete] 391 = The imported type {0} is not visible >-###[obsolete] 392 = The imported type {0} is ambiguous >-###[obsolete] 393 = The imported type {0} cannot be referenced using its binary name >-###[obsolete] 394 = The imported type {0} is defined in an inherited type and an enclosing scope >- > 391 = The static import {0} must be a field or member type > > 395 = Duplicate modifier for the variable {0} > 396 = Illegal modifier for the variable {0}; only final is permitted >-###[obsolete] 397 = Redundant null check: The variable {0} cannot be null at this location >-###[obsolete] 398 = Null pointer access: The variable {0} can only be null at this location >-###[obsolete] 399 = Potential null pointer access: The variable {0} may be null at this location > > 400 = The type {3} must implement the inherited abstract function {2}.{0}({1}) > 401 = Cannot override the final function from {0} >@@ -438,40 +394,19 @@ > 520 = Duplicate type parameter {0} > 521 = Cannot refer to the type parameter {0} as a supertype > 522 = Cannot make a static reference to the non-static type {0} >-523 = The type java.lang.Object cannot be declared as a generic > 524 = The type {0} is not generic; it cannot be parameterized with arguments <{1}> > 525 = Incorrect number of arguments for type {0}; it cannot be parameterized with arguments <{1}> >-526 = Bound mismatch: The type {0} is not a valid substitute for the bounded parameter <{2} extends {3}> of the type {1} > 527 = function {0}({2}) has the same erasure {0}({3}) as another function in type {1} > 528 = Illegal forward reference to type parameter {0} > 529 = The type {0} is not an interface; it cannot be specified as a bounded parameter >-530 = Type safety: The constructor {0}({1}) belongs to the raw type {0}. References to generic type {2} should be parameterized >-531 = Type safety: The function {0}({1}) belongs to the raw type {2}. References to generic type {3} should be parameterized > 532 = Type safety: The expression of type {0} needs unchecked conversion to conform to {1} > 533 = Cannot use the type parameter {0} in a catch block > 534 = Cannot use the parameterized type {0} either in catch block or throws clause > 535 = Cannot create a generic array of {0} >-536 = Type safety: The field {1} from the raw type {2} is assigned a value of type {0}. References to generic type {3} should be parameterized > 537 = The type parameter {0} should not be bounded by the final type {1}. Final types cannot be further extended > 538 = Inconsistent classfile encountered: The undefined type parameter {0} is referenced from within {1} > 539 = The interface {2} cannot be implemented more than once with different arguments: {0} and {1} >-540 = Bound mismatch: The constructor {0}({1}) of type {2} is not applicable for the arguments ({3}). The wildcard parameter {5} has no lower bound, and may actually be more restrictive than argument {4} >-541 = Bound mismatch: The function {0}({1}) of type {2} is not applicable for the arguments ({3}). The wildcard parameter {5} has no lower bound, and may actually be more restrictive than argument {4} >-542 = Bound mismatch: Cannot assign expression of type {0} to wildcard type {1}. The wildcard type has no lower bound, and may actually be more restrictive than expression type >-543 = Bound mismatch: The generic function {0}({1}) of type {2} is not applicable for the arguments ({3}). The inferred type {4} is not a valid substitute for the bounded parameter <{5} extends {6}> >-544 = Bound mismatch: The generic constructor {0}({1}) of type {2} is not applicable for the arguments ({3}). The inferred type {4} is not a valid substitute for the bounded parameter <{5} extends {6}> > 545 = Type safety: Unchecked cast from {0} to {1} >-546 = Cannot perform instanceof check against parameterized type {0}. Use instead its raw form {1} since generic type information will be erased at runtime >-547 = Cannot perform instanceof check against type parameter {0}. Use instead its erasure {1} since generic type information will be erased at runtime >-548 = The function {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}> >-549 = Incorrect number of type arguments for generic function <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}> >-550 = The parameterized function <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4}) >-551 = The constructor {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}> >-552 = Incorrect number of type arguments for generic constructor <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}> >-553 = The parameterized constructor <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4}) >-554 = The function {0}({1}) of raw type {2} is no longer generic; it cannot be parameterized with arguments <{3}> >-555 = The constructor {0}({1}) of raw type {2} is no longer generic; it cannot be parameterized with arguments <{3}> >-556 = The type {1} cannot extend or implement {0}. A supertype may not specify any wildcard > 557 = The generic class {0} may not subclass java.lang.Throwable > 558 = Illegal class literal for the type parameter {0} > 559 = Type safety: The return type {0} for {1}({2}) from the type {3} needs unchecked conversion to conform to {4} from the type {5} >@@ -479,21 +414,13 @@ > 561 = The member type {0}<{1}> must be qualified with a parameterized type, since it is not static > 562 = The member type {0} must be parameterized, since it is qualified with a parameterized type > 563 = The member type {0} cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type {1} >-###[obsolete] 564 = Bound conflict: {0} is inherited with conflicting arguments > 565 = Duplicate functions named {0} with the parameters ({2}) and ({3}) are defined by the type {1} > 566 = Cannot allocate the member type {0} using a parameterized compound name; use its simple name and an enclosing instance of type {1} > 567 = Duplicate bound {0} > 568 = The array type {0} cannot be used as a type parameter bound >-569 = Type safety: Unchecked invocation {0}({3}) of the generic constructor {0}({1}) of type {2} >-570 = Type safety: Unchecked invocation {0}({3}) of the generic function {0}({1}) of type {2} > 571 = The type parameter {0} is hiding the type {1} >-572 = {0} is a raw type. References to generic type {1} should be parameterized > 573 = Cannot specify any additional bound {0} when first bound is a type parameter >-574 = Type safety : A generic array of {0} is created for a varargs parameter > 575 = Illegal qualified access from the type parameter {0} >-576 = The nested type {0} is hiding the type parameter {1} of type {2} >-577 = The nested type {0} is hiding the type parameter {1} of the generic function {2}({3}) of type {4} >-578 = Wildcard is not allowed at this location > > ### FOREACH > 580 = Type mismatch: cannot convert from element type {0} to {1} >@@ -501,50 +428,7 @@ > > ### SOURCE LEVEL > 590 = Syntax error, type parameters are only available if source level is 5.0 >-591 = Syntax error, static imports are only available if source level is 5.0 > 592 = Syntax error, 'for each' statements are only available if source level is 5.0 >-593 = Syntax error, parameterized types are only available if source level is 5.0 >-594 = Syntax error, enum declarations are only available if source level is 5.0 >-595 = Syntax error, varargs are only available if source level is 5.0 >-596 = Syntax error, annotations are only available if source level is 5.0 >-597 = Syntax error, annotation declarations are only available if source level is 5.0 >- >-### ANNOTATIONS >-600 = Illegal modifier for the annotation attribute {0}.{1}; only public & abstract are permitted >-601 = Extended dimensions are illegal in an annotation attribute declaration >-602 = Package annotations must be in file package-info.js >-603 = Illegal modifier for the annotation type {0}; only public & abstract are permitted >-604 = Illegal modifier for the member annotation type {0}; only public, protected, private, static & abstract are permitted >-605 = Invalid type {0} for the annotation attribute {2}.{1}; only primitive type, String, Class, annotation, enumeration are permitted or 1-dimensional arrays thereof >-606 = Cycle detected: the annotation type {0} cannot contain attributes of the annotation type itself >-607 = Cycle detected: a cycle exists between annotation attributes of {0} and {1} >-608 = Duplicate annotation @{0} >-609 = The annotation @{0} must define the attribute {1} >-610 = Duplicate attribute {0} in annotation @{1} >-611 = The attribute {0} is undefined for the annotation type {1} >-612 = The value for annotation attribute {0}.{1} must be a class literal >-613 = The value for annotation attribute {0}.{1} must be a constant expression >-###[obsolete] 614 = The annotation field {0}.{1} must be initialized with a constant expression >-615 = Illegal modifier for the annotation field {0}.{1}; only public, static & final are permitted >-616 = The annotation type {0} cannot override the function {1}.{2}({3}) >-617 = Annotation attributes cannot have parameters >-618 = Annotation attributes cannot be generic >-619 = Annotation type declaration cannot have an explicit superclass >-620 = Annotation type declaration cannot have explicit superinterfaces >-621 = Duplicate element {0} specified in annotation @{1} >-622 = The annotation @{0} is disallowed for this location >-623 = The function {0}({1}) of type {2} must override a superclass function >-624 = Annotation type declaration cannot have a constructor >-625 = The value for annotation attribute {0}.{1} must be some @{2} annotation >-626 = The annotation type {0} should not be used as a superinterface for {1} >-627 = The function {0}({1}) of type {2} should be tagged with @Override since it actually overrides a superclass function >-628 = The deprecated field {0}.{1} should be annotated with @Deprecated >-629 = The deprecated function {0}({1}) of type {2} should be annotated with @Deprecated >-630 = The deprecated type {0} should be annotated with @Deprecated >-631 = Unhandled warning token {0} >-632 = The value for annotation attribute {0}.{1} must be an array initializer >-633 = The value for annotation attribute {0}.{1} must be an enum constant expression >-634 = The function {0}({1}) of type {2} must override or implement a supertype function > > ### CORRUPTED BINARIES > 700 = The class file {0} contains a signature ''{1}'' ill-formed at position {2} >@@ -556,36 +440,3 @@ > ### AUTOBOXING > 720 = The expression of type {0} is boxed into {1} > 721 = The expression of type {0} is unboxed into {1} >- >-### ENUMS >-750 = Illegal modifier for the enum {0}; only public is permitted >-751 = Illegal modifier for the enum constant {0}; no modifier is allowed >-752 = Illegal modifier for the local enum {0}; only abstract is permitted >-753 = Illegal modifier for the member enum {0}; only public, protected, private, static & abstract are permitted >-754 = The enum {1} already defines the function {0}({2}) implicitly >-755 = The enum constant {0}.{1} reference cannot be qualified in a case label >-756 = The type {1} may not subclass {0} explicitly >-757 = Cannot invoke super constructor from enum constructor {0}({1}) >-758 = The enum {2} can only define the abstract function {0}({1}) if it also defines enum constants with corresponding implementations >-759 = The field {0}.{1} cannot be referenced from an enum case label; only enum constants can be used in enum switch >-760 = Illegal modifier for the enum constructor; only private is permitted. >-761 = The enum constant {0}.{1} has no corresponding case label >-762 = Cannot refer to the static enum field {0}.{1} within an initializer >- >-### VARARGS >-800 = Extended dimensions are illegal for a variable argument >-801 = The argument of type {0} should explicitly be cast to {1} for the invocation of the varargs function {2}({3}) from type {4}. It could alternatively be cast to {5} for a varargs invocation >-802 = The argument of type {0} should explicitly be cast to {1} for the invocation of the varargs constructor {2}({3}). It could alternatively be cast to {4} for a varargs invocation >-803 = Varargs functions should only override or be overridden by other varargs functions unlike {2}.{0}({1}) and {4}.{0}({3}) >- >-### GENERIC JAVADOC >-850 = Bound mismatch: The generic function {0}({1}) of type {2} is not applicable for the arguments ({3}). The inferred type {4} is not a valid substitute for the bounded parameter <{5} extends {6}> >-851 = The function {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}> >-852 = Incorrect number of type arguments for generic function <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}> >-853 = The parameterized function <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4}) >-854 = The function {0}({1}) of raw type {2} is no longer generic; it cannot be parameterized with arguments <{3}> >-855 = Bound mismatch: The generic constructor {0}({1}) of type {2} is not applicable for the arguments ({3}). The inferred type {4} is not a valid substitute for the bounded parameter <{5} extends {6}> >-856 = The constructor {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}> >-857 = Incorrect number of type arguments for generic constructor <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}> >-858 = The parameterized constructor <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4}) >-859 = The constructor {0}({1}) of raw type {2} is no longer generic; it cannot be parameterized with arguments <{3}> >Index: src/org/eclipse/wst/jsdt/internal/compiler/batch/messages.properties >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/batch/messages.properties,v >retrieving revision 1.3 >diff -u -r1.3 messages.properties >--- src/org/eclipse/wst/jsdt/internal/compiler/batch/messages.properties 30 Apr 2008 21:32:33 -0000 1.3 >+++ src/org/eclipse/wst/jsdt/internal/compiler/batch/messages.properties 6 Apr 2009 18:29:55 -0000 >@@ -277,7 +277,6 @@ > \ unusedPrivate + unused private member declaration\n\ > \ unusedThrown unused declared thrown exception\n\ > \ uselessTypeCheck unnecessary cast/instanceof operation\n\ >-\ varargsCast + varargs argument need explicit cast\n\ > \ warningToken + unhandled warning token in @SuppressWarnings\n\ > \ \n\ > \ Advanced options:\n\ >Index: src/org/eclipse/wst/jsdt/internal/compiler/batch/Main.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/batch/Main.java,v >retrieving revision 1.15 >diff -u -r1.15 Main.java >--- src/org/eclipse/wst/jsdt/internal/compiler/batch/Main.java 12 Mar 2009 05:00:39 -0000 1.15 >+++ src/org/eclipse/wst/jsdt/internal/compiler/batch/Main.java 6 Apr 2009 18:29:55 -0000 >@@ -1776,10 +1776,6 @@ > this.options.put( > CompilerOptions.OPTION_SuppressWarnings, > isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED); >- } else if (token.equals("warningToken")) {//$NON-NLS-1$ >- this.options.put( >- CompilerOptions.OPTION_ReportUnhandledWarningToken, >- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); > } else if (token.equals("unnecessaryElse")) {//$NON-NLS-1$ > this.options.put( > CompilerOptions.OPTION_ReportUnnecessaryElse, >@@ -1880,10 +1876,6 @@ > this.options.put( > CompilerOptions.OPTION_ReportTypeParameterHiding, > isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); >- } else if (token.equals("varargsCast")) { //$NON-NLS-1$ >- this.options.put( >- CompilerOptions.OPTION_ReportVarargsArgumentNeedCast, >- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); > } else if (token.equals("null")) { //$NON-NLS-1$ > if (isEnabling) { > this.options.put(CompilerOptions.OPTION_ReportNullReference, >@@ -1916,23 +1908,6 @@ > this.options.put( > CompilerOptions.OPTION_ReportAutoboxing, > isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); >- } else if (token.equals("over-ann")) { //$NON-NLS-1$ >- this.options.put( >- CompilerOptions.OPTION_ReportMissingOverrideAnnotation, >- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); >- } else if (token.equals("dep-ann")) { //$NON-NLS-1$ >- this.options.put( >- CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation, >- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); >- } else if (token.equals("intfAnnotation")) { //$NON-NLS-1$ >- this.options.put( >- CompilerOptions.OPTION_ReportAnnotationSuperInterface, >- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); >- } else if (token.equals("enumSwitch") //$NON-NLS-1$ >- || token.equals("incomplete-switch")) { //$NON-NLS-1$ >- this.options.put( >- CompilerOptions.OPTION_ReportIncompleteEnumSwitch, >- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE); > } else if (token.equals("hiding")) { //$NON-NLS-1$ > this.options.put( > CompilerOptions.OPTION_ReportHiddenCatchBlock, >Index: src/org/eclipse/wst/jsdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.13 >diff -u -r1.13 CompletionParser.java >--- src/org/eclipse/wst/jsdt/internal/codeassist/complete/CompletionParser.java 1 Oct 2008 21:44:27 -0000 1.13 >+++ src/org/eclipse/wst/jsdt/internal/codeassist/complete/CompletionParser.java 6 Apr 2009 18:29:54 -0000 >@@ -3366,16 +3366,6 @@ > } > } > } >-protected void consumeOnlyTypeArguments() { >- super.consumeOnlyTypeArguments(); >- popElement(K_BINARY_OPERATOR); >- if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_PARAMETERIZED_METHOD_INVOCATION) { >- popElement(K_PARAMETERIZED_METHOD_INVOCATION); >- pushOnElementStack(K_PARAMETERIZED_METHOD_INVOCATION, INSIDE_NAME); >- } else { >- popElement(K_PARAMETERIZED_ALLOCATION); >- } >-} > protected void consumeOnlyTypeArgumentsForCastExpression() { > super.consumeOnlyTypeArgumentsForCastExpression(); > pushOnElementStack(K_PARAMETERIZED_CAST); >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier.java,v >retrieving revision 1.8 >diff -u -r1.8 MethodVerifier.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier.java 30 Apr 2008 21:32:20 -0000 1.8 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier.java 6 Apr 2009 18:29:56 -0000 >@@ -139,7 +139,6 @@ > } > void checkAgainstInheritedMethods(MethodBinding currentMethod, MethodBinding[] methods, int length, MethodBinding[] allInheritedMethods) { > if (this.type.isAnnotationType()) { // annotation cannot override any method >- problemReporter().annotationCannotOverrideMethod(currentMethod, methods[length - 1]); > return; // do not repoort against subsequent inherited methods > } > CompilerOptions options = type.scope.compilerOptions(); >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodScope.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodScope.java,v >retrieving revision 1.27 >diff -u -r1.27 MethodScope.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodScope.java 30 Apr 2008 21:32:21 -0000 1.27 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodScope.java 6 Apr 2009 18:29:56 -0000 >@@ -106,11 +106,7 @@ > // check for abnormal modifiers > final int UNEXPECTED_MODIFIERS = ~(ClassFileConstants.AccStatic | ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate | ClassFileConstants.AccProtected | ClassFileConstants.AccStrictfp); > if (declaringClass.isEnum() && !((ConstructorDeclaration) referenceContext).isDefaultConstructor) { >- final int UNEXPECTED_ENUM_CONSTR_MODIFIERS = ~(ClassFileConstants.AccPrivate | ClassFileConstants.AccStrictfp); >- if ((realModifiers & UNEXPECTED_ENUM_CONSTR_MODIFIERS) != 0) { >- problemReporter().illegalModifierForEnumConstructor((AbstractMethodDeclaration) referenceContext); >- modifiers &= ~ExtraCompilerModifiers.AccJustFlag | ~UNEXPECTED_ENUM_CONSTR_MODIFIERS; >- } else if ((((AbstractMethodDeclaration) referenceContext).modifiers & ClassFileConstants.AccStrictfp) != 0) { >+ if ((((AbstractMethodDeclaration) referenceContext).modifiers & ClassFileConstants.AccStrictfp) != 0) { > // must check the parse node explicitly > problemReporter().illegalModifierForMethod((AbstractMethodDeclaration) referenceContext); > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java,v >retrieving revision 1.38 >diff -u -r1.38 SourceTypeBinding.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java 3 Dec 2008 22:14:03 -0000 1.38 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java 6 Apr 2009 18:29:57 -0000 >@@ -1438,15 +1438,10 @@ > if (methodDecl == null) { > methodDecl = method.sourceMethod(); // cannot be retrieved after binding is lost & may still be null if method is special > if (methodDecl != null && methodDecl.binding != null) { // ensure its a valid user defined method >- if (isEnumSpecialMethod) { >- this.scope.problemReporter() >- .duplicateEnumSpecialMethod(this, >- methodDecl); >- } else { >- this.scope >- .problemReporter() >- .duplicateMethodInType(this, methodDecl); >- } >+ this.scope >+ .problemReporter() >+ .duplicateMethodInType(this, methodDecl); >+ > methodDecl.binding = null; > // do not alter original method array until resolution is over, due to reentrance (143259) > if (resolvedMethods == this.methods) { >@@ -1464,14 +1459,9 @@ > AbstractMethodDeclaration method2Decl = method2 > .sourceMethod(); > if (method2Decl != null && method2Decl.binding != null) { // ensure its a valid user defined method >- if (isEnumSpecialMethod) { >- this.scope.problemReporter() >- .duplicateEnumSpecialMethod(this, >- method2Decl); >- } else { >- this.scope.problemReporter().duplicateMethodInType( >- this, method2Decl); >- } >+ this.scope.problemReporter().duplicateMethodInType( >+ this, method2Decl); >+ > method2Decl.binding = null; > // do not alter original method array until resolution is over, due to reentrance (143259) > if (resolvedMethods == this.methods) { >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.31 >diff -u -r1.31 Scope.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/Scope.java 29 Oct 2008 22:34:04 -0000 1.31 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/Scope.java 6 Apr 2009 18:29:56 -0000 >@@ -443,21 +443,10 @@ > if (method == null) return null; // incompatible > if (!method.isValidBinding()) return method; // bound check issue is taking precedence > parameters = method.parameters; // reacquire them after type inference has performed >- } else if (genericTypeArguments != null) { >- if (method instanceof ParameterizedGenericMethodBinding) { >- if (!((ParameterizedGenericMethodBinding) method).wasInferred) { >- // attempt to invoke generic method of raw type with type hints <String>foo() >- return new ProblemMethodBinding(method, method.selector, genericTypeArguments, ProblemReasons.TypeArgumentsForRawGenericMethod); >- } >- } else { >- return new ProblemMethodBinding(method, method.selector, genericTypeArguments, ProblemReasons.TypeParameterArityMismatch); >- } > } > > if (parameterCompatibilityLevel(method, arguments) > NOT_COMPATIBLE) > return method; >- if (genericTypeArguments != null) >- return new ProblemMethodBinding(method, method.selector, arguments, ProblemReasons.ParameterizedMethodTypeMismatch); > return null; // incompatible > } > >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java,v >retrieving revision 1.22 >diff -u -r1.22 ReferenceBinding.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java 13 May 2008 22:02:29 -0000 1.22 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java 6 Apr 2009 18:29:56 -0000 >@@ -16,7 +16,6 @@ > import org.eclipse.wst.jsdt.core.JavaScriptCore; > import org.eclipse.wst.jsdt.core.compiler.CharOperation; > import org.eclipse.wst.jsdt.core.infer.InferredType; >-import org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration; > import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.wst.jsdt.internal.compiler.env.IDependent; > import org.eclipse.wst.jsdt.internal.compiler.util.SimpleLookupTable; >@@ -569,16 +568,7 @@ > boolean inCycle = false; // check each method before failing > for (int i = 0, l = currentMethods.length; i < l; i++) { > TypeBinding returnType = currentMethods[i].returnType.leafComponentType(); >- if (this == returnType) { >- if (this instanceof SourceTypeBinding) { >- MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod(); >- ((SourceTypeBinding) this).scope.problemReporter().annotationCircularity(this, this, decl != null ? decl.returnType : null); >- } >- } else if (returnType.isAnnotationType() && ((ReferenceBinding) returnType).detectAnnotationCycle()) { >- if (this instanceof SourceTypeBinding) { >- MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod(); >- ((SourceTypeBinding) this).scope.problemReporter().annotationCircularity(this, returnType, decl != null ? decl.returnType : null); >- } >+ if (returnType.isAnnotationType() && ((ReferenceBinding) returnType).detectAnnotationCycle()) { > inCycle = true; > } > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/ClassScope.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ClassScope.java,v >retrieving revision 1.17 >diff -u -r1.17 ClassScope.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/ClassScope.java 30 Dec 2008 22:07:41 -0000 1.17 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/ClassScope.java 6 Apr 2009 18:29:56 -0000 >@@ -353,7 +353,6 @@ > sourceType.typeVariables = Binding.NO_TYPE_VARIABLES; // safety > > if (sourceType.id == T_JavaLangObject) { // handle the case of redefining java.lang.Object up front >- problemReporter().objectCannotBeGeneric(referenceContext); > return; > } > sourceType.typeVariables = createTypeVariables(typeParameters, sourceType); >@@ -442,9 +441,7 @@ > final int UNEXPECTED_MODIFIERS = > ~(ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate | ClassFileConstants.AccProtected | ClassFileConstants.AccStatic | ClassFileConstants.AccAbstract | ClassFileConstants.AccInterface | ClassFileConstants.AccStrictfp | ClassFileConstants.AccAnnotation); > if ((realModifiers & UNEXPECTED_MODIFIERS) != 0) { >- if ((realModifiers & ClassFileConstants.AccAnnotation) != 0) >- problemReporter().illegalModifierForAnnotationMemberType(sourceType); >- else >+ if ((realModifiers & ClassFileConstants.AccAnnotation) == 0) > problemReporter().illegalModifierForMemberInterface(sourceType); > } > /* >@@ -456,28 +453,13 @@ > } else { > final int UNEXPECTED_MODIFIERS = ~(ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract | ClassFileConstants.AccInterface | ClassFileConstants.AccStrictfp | ClassFileConstants.AccAnnotation); > if ((realModifiers & UNEXPECTED_MODIFIERS) != 0) { >- if ((realModifiers & ClassFileConstants.AccAnnotation) != 0) >- problemReporter().illegalModifierForAnnotationType(sourceType); >- else >+ if ((realModifiers & ClassFileConstants.AccAnnotation) == 0) > problemReporter().illegalModifierForInterface(sourceType); > } > } > modifiers |= ClassFileConstants.AccAbstract; > } else if ((realModifiers & ClassFileConstants.AccEnum) != 0) { > // detect abnormal cases for enums >- if (isMemberType) { // includes member types defined inside local types >- final int UNEXPECTED_MODIFIERS = ~(ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate | ClassFileConstants.AccProtected | ClassFileConstants.AccStatic | ClassFileConstants.AccStrictfp | ClassFileConstants.AccEnum); >- if ((realModifiers & UNEXPECTED_MODIFIERS) != 0) >- problemReporter().illegalModifierForMemberEnum(sourceType); >- } else if (sourceType.isLocalType()) { // each enum constant is an anonymous local type >- final int UNEXPECTED_MODIFIERS = ~(ClassFileConstants.AccStrictfp | ClassFileConstants.AccFinal | ClassFileConstants.AccEnum); // add final since implicitly set for anonymous type >- if ((realModifiers & UNEXPECTED_MODIFIERS) != 0) >- problemReporter().illegalModifierForLocalEnum(sourceType); >- } else { >- final int UNEXPECTED_MODIFIERS = ~(ClassFileConstants.AccPublic | ClassFileConstants.AccStrictfp | ClassFileConstants.AccEnum); >- if ((realModifiers & UNEXPECTED_MODIFIERS) != 0) >- problemReporter().illegalModifierForEnum(sourceType); >- } > if (!sourceType.isAnonymousType()) { > checkAbstractEnum: { > // does define abstract methods ? >@@ -615,18 +597,12 @@ > > // and then check that they are the only ones > if ((modifiers & ExtraCompilerModifiers.AccJustFlag) != IMPLICIT_MODIFIERS) { >- if ((declaringClass.modifiers & ClassFileConstants.AccAnnotation) != 0) >- problemReporter().illegalModifierForAnnotationField(fieldDecl); >- else >+ if ((declaringClass.modifiers & ClassFileConstants.AccAnnotation) == 0) > problemReporter().illegalModifierForInterfaceField(fieldDecl); > } > fieldBinding.modifiers = modifiers; > return; > } else if (fieldDecl.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) { >- // check that they are not modifiers in source >- if ((modifiers & ExtraCompilerModifiers.AccJustFlag) != 0) >- problemReporter().illegalModifierForEnumConstant(declaringClass, fieldDecl); >- > // set the modifiers > final int IMPLICIT_MODIFIERS = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic | ClassFileConstants.AccFinal | ClassFileConstants.AccEnum; > fieldBinding.modifiers|= IMPLICIT_MODIFIERS; >@@ -852,10 +828,6 @@ > problemReporter().superclassMustBeAClass(sourceType, superclassRef, superclass); > } else if (superclass.isFinal()) { > problemReporter().classExtendFinalClass(sourceType, superclassRef, superclass); >- } else if ((superclass.tagBits & TagBits.HasDirectWildcard) != 0) { >- problemReporter().superTypeCannotUseWildcard(sourceType, superclassRef, superclass); >- } else if (superclass.erasure().id == T_JavaLangEnum) { >- problemReporter().cannotExtendEnum(sourceType, superclassRef, superclass); > } else { > // only want to reach here when no errors are reported > sourceType.superclass = superclass; >@@ -910,10 +882,6 @@ > // check argument type compatibility > ParameterizedTypeBinding superType = environment().createParameterizedType(rootEnumType, new TypeBinding[]{ environment().convertToRawType(sourceType) } , null); > sourceType.superclass = superType; >- // bound check (in case of bogus definition of Enum type) >- if (refTypeVariables[0].boundCheck(superType, sourceType) != TypeConstants.OK) { >- problemReporter().typeMismatchError(rootEnumType, refTypeVariables[0], sourceType, null); >- } > return !foundCycle; > } > >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier15.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier15.java,v >retrieving revision 1.4 >diff -u -r1.4 MethodVerifier15.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier15.java 25 Oct 2007 00:09:16 -0000 1.4 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/MethodVerifier15.java 6 Apr 2009 18:29:56 -0000 >@@ -102,8 +102,6 @@ > > for (int i = 0, l = abstractMethods.length; i < l; i++) { > MethodBinding abstractMethod = abstractMethods[i]; >- if (concreteMethod.isVarargs() != abstractMethod.isVarargs()) >- problemReporter().varargsConflict(concreteMethod, abstractMethod, this.type); > > // so the parameters are equal and the return type is compatible b/w the currentMethod & the substituted inheritedMethod > MethodBinding originalInherited = abstractMethod.original(); >@@ -127,9 +125,6 @@ > } > } > void checkForBridgeMethod(MethodBinding currentMethod, MethodBinding inheritedMethod, MethodBinding[] allInheritedMethods) { >- if (currentMethod.isVarargs() != inheritedMethod.isVarargs()) >- problemReporter(currentMethod).varargsConflict(currentMethod, inheritedMethod, this.type); >- > // so the parameters are equal and the return type is compatible b/w the currentMethod & the substituted inheritedMethod > MethodBinding originalInherited = inheritedMethod.original(); > if (originalInherited.returnType != currentMethod.returnType) { >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java,v >retrieving revision 1.3 >diff -u -r1.3 ParameterizedGenericMethodBinding.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 25 Oct 2007 00:09:16 -0000 1.3 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 6 Apr 2009 18:29:56 -0000 >@@ -40,10 +40,6 @@ > computeSubstitutes: { > if (substitutes != null) { > // explicit type arguments got supplied >- if (substitutes.length != typeVariables.length) { >- // incompatible due to wrong arity >- return new ProblemMethodBinding(originalMethod, originalMethod.selector, substitutes, ProblemReasons.TypeParameterArityMismatch); >- } > methodSubstitute = scope.environment().createParameterizedGenericMethod(originalMethod, substitutes); > break computeSubstitutes; > } >@@ -87,14 +83,6 @@ > TypeVariableBinding typeVariable = typeVariables[i]; > TypeBinding substitute = methodSubstitute.typeArguments[i]; > switch (typeVariable.boundCheck(methodSubstitute, substitute)) { >- case TypeConstants.MISMATCH : >- // incompatible due to bound check >- int argLength = arguments.length; >- TypeBinding[] augmentedArguments = new TypeBinding[argLength + 2]; // append offending substitute and typeVariable >- System.arraycopy(arguments, 0, augmentedArguments, 0, argLength); >- augmentedArguments[argLength] = substitute; >- augmentedArguments[argLength+1] = typeVariable; >- return new ProblemMethodBinding(methodSubstitute, originalMethod.selector, augmentedArguments, ProblemReasons.ParameterBoundMismatch); > case TypeConstants.UNCHECKED : > // tolerate unchecked bounds > methodSubstitute.isUnchecked = true; >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/ProblemReasons.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ProblemReasons.java,v >retrieving revision 1.3 >diff -u -r1.3 ProblemReasons.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/ProblemReasons.java 30 Apr 2008 21:32:20 -0000 1.3 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/ProblemReasons.java 6 Apr 2009 18:29:56 -0000 >@@ -21,10 +21,6 @@ > final int NonStaticReferenceInStaticContext = 7; > final int ReceiverTypeNotVisible = 8; > final int IllegalSuperTypeVariable = 9; >- final int ParameterBoundMismatch = 10; // for generic method >- final int TypeParameterArityMismatch = 11; // for generic method >- final int ParameterizedMethodTypeMismatch = 12; // for generic method >- final int TypeArgumentsForRawGenericMethod = 13; // for generic method > final int InvalidTypeForStaticImport = 14; > final int NotAFunction = 15; > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v >retrieving revision 1.5 >diff -u -r1.5 ParameterizedTypeBinding.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.java 30 Apr 2008 21:32:21 -0000 1.5 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.java 6 Apr 2009 18:29:56 -0000 >@@ -69,7 +69,6 @@ > for (int i = 0, length = typeVariables.length; i < length; i++) { > if (typeVariables[i].boundCheck(this, this.arguments[i]) != TypeConstants.OK) { > hasErrors = true; >- scope.problemReporter().typeMismatchError(this.arguments[i], typeVariables[i], this.type, argumentReferences[i]); > } > } > } >Index: src/org/eclipse/wst/jsdt/core/compiler/IProblem.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/core/compiler/IProblem.java,v >retrieving revision 1.13 >diff -u -r1.13 IProblem.java >--- src/org/eclipse/wst/jsdt/core/compiler/IProblem.java 12 Mar 2009 05:00:40 -0000 1.13 >+++ src/org/eclipse/wst/jsdt/core/compiler/IProblem.java 6 Apr 2009 18:29:54 -0000 >@@ -89,7 +89,6 @@ > * AnnotationValueMustBeArrayInitializer > * InvalidEncoding > * CannotReadSource >- * EnumStaticFieldInInInitializerContext > * ExternalProblemNotFixable > * ExternalProblemFixable > * IBM Corporation - added the following constants >@@ -399,7 +398,6 @@ > int NoImplicitStringConversionForCharArrayExpression = Internal + 151; > // constant expressions > int StringConstantIsExceedingUtf8Limit = Internal + 152; >- int NonConstantExpression = Internal + 153; > int NumericValueOutOfRange = Internal + 154; > // cast expressions > int IllegalCast = TypeRelated + 156; >@@ -555,28 +553,6 @@ > int ObjectCannotHaveSuperTypes = Internal + 329; > int ObjectMustBeClass = Internal + 330; > >- /** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */ >- int SuperclassNotFound = TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330 >- /** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */ >- int SuperclassNotVisible = TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331 >- /** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */ >- int SuperclassAmbiguous = TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332 >- /** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */ >- int SuperclassInternalNameProvided = TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333 >- /** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */ >- int SuperclassInheritedNameHidesEnclosingName = TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334 >- >- /** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */ >- int InterfaceNotFound = TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335 >- /** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */ >- int InterfaceNotVisible = TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336 >- /** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */ >- int InterfaceAmbiguous = TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337 >- /** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */ >- int InterfaceInternalNameProvided = TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338 >- /** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */ >- int InterfaceInheritedNameHidesEnclosingName = TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339 >- > // field related problems > int DuplicateField = FieldRelated + 340; > int DuplicateModifierForField = FieldRelated + 341; >@@ -597,72 +573,21 @@ > int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362; > int AbstractMethodInAbstractClass = MethodRelated + 363; > int ArgumentTypeCannotBeVoid = MethodRelated + 364; >- /** @deprecated - problem is no longer generated, use {@link #CannotAllocateVoidArray} instead */ >- int ArgumentTypeCannotBeVoidArray = MethodRelated + 365; >- /** @deprecated - problem is no longer generated, use {@link #CannotAllocateVoidArray} instead */ >- int ReturnTypeCannotBeVoidArray = MethodRelated + 366; > int NativeMethodsCannotBeStrictfp = MethodRelated + 367; > int DuplicateModifierForArgument = MethodRelated + 368; > >- /** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */ >- int ArgumentTypeNotFound = MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370 >- /** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */ >- int ArgumentTypeNotVisible = MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371 >- /** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */ >- int ArgumentTypeAmbiguous = MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372 >- /** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */ >- int ArgumentTypeInternalNameProvided = MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373 >- /** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */ >- int ArgumentTypeInheritedNameHidesEnclosingName = MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374 >- >- /** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */ >- int ExceptionTypeNotFound = MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375 >- /** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */ >- int ExceptionTypeNotVisible = MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376 >- /** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */ >- int ExceptionTypeAmbiguous = MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377 >- /** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */ >- int ExceptionTypeInternalNameProvided = MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378 >- /** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */ >- int ExceptionTypeInheritedNameHidesEnclosingName = MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379 >- >- /** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */ >- int ReturnTypeNotFound = MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380 >- /** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */ >- int ReturnTypeNotVisible = MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381 >- /** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */ >- int ReturnTypeAmbiguous = MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382 >- /** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */ >- int ReturnTypeInternalNameProvided = MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383 >- /** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */ >- int ReturnTypeInheritedNameHidesEnclosingName = MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384 >- > // import related problems > int ConflictingImport = ImportRelated + 385; > int DuplicateImport = ImportRelated + 386; > int CannotImportPackage = ImportRelated + 387; > > int ImportNotFound = ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390 >- /** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */ >- int ImportNotVisible = ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391 >- /** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */ >- int ImportAmbiguous = ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392 >- /** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */ >- int ImportInternalNameProvided = ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393 >- /** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */ >- int ImportInheritedNameHidesEnclosingName = ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394 > > int InvalidTypeForStaticImport = ImportRelated + 391; > > // local variable related problems > int DuplicateModifierForVariable = MethodRelated + 395; > int IllegalModifierForVariable = MethodRelated + 396; >- /** @deprecated - problem is no longer generated, use {@link #RedundantNullCheckOnNonNullLocalVariable} instead */ >- int LocalVariableCannotBeNull = Internal + 397; // since 3.3: semantics are LocalVariableRedundantCheckOnNonNull >- /** @deprecated - problem is no longer generated, use {@link #NullLocalVariableReference}, {@link #RedundantNullCheckOnNullLocalVariable} or {@link #RedundantLocalVariableNullAssignment} instead */ >- int LocalVariableCanOnlyBeNull = Internal + 398; // since 3.3: split with LocalVariableRedundantCheckOnNull depending on context >- /** @deprecated - problem is no longer generated, use {@link #PotentialNullLocalVariableReference} instead */ >- int LocalVariableMayBeNull = Internal + 399; > > // method verifier problems > int AbstractMethodMustBeImplemented = MethodRelated + 400; >@@ -809,10 +734,8 @@ > int DuplicateTypeVariable = Internal + 520; > int IllegalTypeVariableSuperReference = Internal + 521; > int NonStaticTypeFromStaticInvocation = Internal + 522; >- int ObjectCannotBeGeneric = Internal + 523; > int NonGenericType = TypeRelated + 524; > int IncorrectArityForParameterizedType = TypeRelated + 525; >- int TypeArgumentMismatch = TypeRelated + 526; > int DuplicateMethodErasure = TypeRelated + 527; > int ReferenceToForwardTypeVariable = TypeRelated + 528; > int BoundMustBeAnInterface = TypeRelated + 529; >@@ -823,27 +746,13 @@ > int FinalBoundForTypeVariable = TypeRelated + 537; > int UndefinedTypeVariable = Internal + 538; > int SuperInterfacesCollide = TypeRelated + 539; >- int GenericMethodTypeArgumentMismatch = TypeRelated + 543; >- int GenericConstructorTypeArgumentMismatch = TypeRelated + 544; > int UnsafeGenericCast = TypeRelated + 545; >- int IllegalInstanceofParameterizedType = Internal + 546; >- int IllegalInstanceofTypeParameter = Internal + 547; >- int NonGenericMethod = TypeRelated + 548; >- int IncorrectArityForParameterizedMethod = TypeRelated + 549; >- int ParameterizedMethodArgumentTypeMismatch = TypeRelated + 550; >- int NonGenericConstructor = TypeRelated + 551; >- int IncorrectArityForParameterizedConstructor = TypeRelated + 552; >- int ParameterizedConstructorArgumentTypeMismatch = TypeRelated + 553; >- int TypeArgumentsForRawGenericMethod = TypeRelated + 554; >- int TypeArgumentsForRawGenericConstructor = TypeRelated + 555; >- int SuperTypeUsingWildcard = TypeRelated + 556; > int GenericTypeCannotExtendThrowable = TypeRelated + 557; > int IllegalClassLiteralForTypeVariable = TypeRelated + 558; > int UnsafeReturnTypeOverride = MethodRelated + 559; > int MethodNameClash = MethodRelated + 560; > int MissingArgumentsForParameterizedMemberType = TypeRelated + 562; > int StaticMemberOfParameterizedType = TypeRelated + 563; >- int BoundHasConflictingArguments = TypeRelated + 564; > int DuplicateParameterizedMethods = MethodRelated + 565; > int IllegalQualifiedParameterizedTypeAllocation = TypeRelated + 566; > int DuplicateBounds = TypeRelated + 567; >@@ -851,9 +760,6 @@ > int TypeParameterHidingType = TypeRelated + 571; > int NoAdditionalBoundAfterTypeVariable = TypeRelated + 573; > int IllegalAccessFromTypeVariable = TypeRelated + 575; >- int TypeHidingTypeParameterFromType = TypeRelated + 576; >- int TypeHidingTypeParameterFromMethod = TypeRelated + 577; >- int InvalidUsageOfWildcard = Syntax + Internal + 578; > > /** > * Foreach >@@ -865,52 +771,7 @@ > * 1.5 Syntax errors (when source level < 1.5) > */ > int InvalidUsageOfTypeParameters = Syntax + Internal + 590; >- int InvalidUsageOfStaticImports = Syntax + Internal + 591; > int InvalidUsageOfForeachStatements = Syntax + Internal + 592; >- int InvalidUsageOfTypeArguments = Syntax + Internal + 593; >- int InvalidUsageOfEnumDeclarations = Syntax + Internal + 594; >- int InvalidUsageOfVarargs = Syntax + Internal + 595; >- int InvalidUsageOfAnnotations = Syntax + Internal + 596; >- int InvalidUsageOfAnnotationDeclarations = Syntax + Internal + 597; >- >- /** >- * Annotation >- */ >- int IllegalModifierForAnnotationMethod = MethodRelated + 600; >- int IllegalExtendedDimensions = MethodRelated + 601; >- int InvalidFileNameForPackageAnnotations = Syntax + Internal + 602; >- int IllegalModifierForAnnotationType = TypeRelated + 603; >- int IllegalModifierForAnnotationMemberType = TypeRelated + 604; >- int InvalidAnnotationMemberType = TypeRelated + 605; >- int AnnotationCircularitySelfReference = TypeRelated + 606; >- int AnnotationCircularity = TypeRelated + 607; >- int DuplicateAnnotation = TypeRelated + 608; >- int MissingValueForAnnotationMember = TypeRelated + 609; >- int DuplicateAnnotationMember = Internal + 610; >- int UndefinedAnnotationMember = MethodRelated + 611; >- int AnnotationValueMustBeClassLiteral = Internal + 612; >- int AnnotationValueMustBeConstant = Internal + 613; >- int AnnotationFieldNeedConstantInitialization = Internal + 614; >- int IllegalModifierForAnnotationField = Internal + 615; >- int AnnotationCannotOverrideMethod = MethodRelated + 616; >- int AnnotationMembersCannotHaveParameters = Syntax + Internal + 617; >- int AnnotationMembersCannotHaveTypeParameters = Syntax + Internal + 618; >- int AnnotationTypeDeclarationCannotHaveSuperclass = Syntax + Internal + 619; >- int AnnotationTypeDeclarationCannotHaveSuperinterfaces = Syntax + Internal + 620; >- int DuplicateTargetInTargetAnnotation = Internal + 621; >- int DisallowedTargetForAnnotation = TypeRelated + 622; >- int MethodMustOverride = MethodRelated + 623; >- int AnnotationTypeDeclarationCannotHaveConstructor = Syntax + Internal + 624; >- int AnnotationValueMustBeAnnotation = Internal + 625; >- int AnnotationTypeUsedAsSuperInterface = TypeRelated + 626; >- int MissingOverrideAnnotation = MethodRelated + 627; >- int FieldMissingDeprecatedAnnotation = Internal + 628; >- int MethodMissingDeprecatedAnnotation = Internal + 629; >- int TypeMissingDeprecatedAnnotation = Internal + 630; >- int UnhandledWarningToken = Internal + 631; >- int AnnotationValueMustBeArrayInitializer = Internal + 632; >- int AnnotationValueMustBeAnEnumConstant = Internal + 633; >- int MethodMustOverrideOrImplement = MethodRelated + 634; > > /** > * Corrupted binaries >@@ -929,45 +790,6 @@ > int UnboxingConversion = Internal + 721; > > /** >- * Enum >- */ >- int IllegalModifierForEnum = TypeRelated + 750; >- int IllegalModifierForEnumConstant = FieldRelated + 751; >- int IllegalModifierForLocalEnum = TypeRelated + 752; >- int IllegalModifierForMemberEnum = TypeRelated + 753; >- int CannotDeclareEnumSpecialMethod = MethodRelated + 754; >- int IllegalQualifiedEnumConstantLabel = FieldRelated + 755; >- int CannotExtendEnum = TypeRelated + 756; >- int CannotInvokeSuperConstructorInEnum = MethodRelated + 757; >- int EnumAbstractMethodMustBeImplemented = MethodRelated + 758; >- int EnumSwitchCannotTargetField = FieldRelated + 759; >- int IllegalModifierForEnumConstructor = MethodRelated + 760; >- int MissingEnumConstantCase = FieldRelated + 761; >- int EnumStaticFieldInInInitializerContext = FieldRelated + 762; >- >- /** >- * Var args >- */ >- int IllegalExtendedDimensionsForVarArgs = Syntax + Internal + 800; >- int MethodVarargsArgumentNeedCast = MethodRelated + 801; >- int ConstructorVarargsArgumentNeedCast = ConstructorRelated + 802; >- int VarargsConflict = MethodRelated + 803; >- >- /** >- * Javadoc Generic >- */ >- int JavadocGenericMethodTypeArgumentMismatch = Javadoc + Internal + 850; >- int JavadocNonGenericMethod = Javadoc + Internal + 851; >- int JavadocIncorrectArityForParameterizedMethod = Javadoc + Internal + 852; >- int JavadocParameterizedMethodArgumentTypeMismatch = Javadoc + Internal + 853; >- int JavadocTypeArgumentsForRawGenericMethod = Javadoc + Internal + 854; >- int JavadocGenericConstructorTypeArgumentMismatch = Javadoc + Internal + 855; >- int JavadocNonGenericConstructor = Javadoc + Internal + 856; >- int JavadocIncorrectArityForParameterizedConstructor = Javadoc + Internal + 857; >- int JavadocParameterizedConstructorArgumentTypeMismatch = Javadoc + Internal + 858; >- int JavadocTypeArgumentsForRawGenericConstructor = Javadoc + Internal + 859; >- >- /** > * External problems -- These are problems defined by other plugins > */ > >Index: src/org/eclipse/wst/jsdt/internal/compiler/parser/Parser.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/parser/Parser.java,v >retrieving revision 1.55 >diff -u -r1.55 Parser.java >--- src/org/eclipse/wst/jsdt/internal/compiler/parser/Parser.java 3 Dec 2008 22:14:05 -0000 1.55 >+++ src/org/eclipse/wst/jsdt/internal/compiler/parser/Parser.java 6 Apr 2009 18:29:57 -0000 >@@ -1621,11 +1621,6 @@ > annotationTypeDeclaration.javadoc = this.javadoc; > this.javadoc = null; > pushOnAstStack(annotationTypeDeclaration); >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- this.problemReporter().invalidUsageOfAnnotationDeclarations(annotationTypeDeclaration); >- } > > // recovery > if (this.currentElement != null){ >@@ -3589,13 +3584,6 @@ > > this.listLength = 0; // will be updated when reading super-interfaces > >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- //TODO this code will be never run while 'enum' is an identifier in 1.3 scanner >- this.problemReporter().invalidUsageOfEnumDeclarations(enumDeclaration); >- } >- > // recovery > if (this.currentElement != null){ > this.lastCheckPoint = enumDeclaration.bodyStart; >@@ -3902,17 +3890,6 @@ > /* if incomplete method header, this.listLength counter will not have been reset, > indicating that some arguments are available on the stack */ > this.listLength++; >- >-// if(isVarArgs) { >-// if (!this.statementRecoveryActivated && >-// options.sourceLevel < ClassFileConstants.JDK1_5 && >-// this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >-// this.problemReporter().invalidUsageOfVarargs(arg); >-// } else if (!this.statementRecoveryActivated && >-// extendedDimensions > 0) { >-// this.problemReporter().illegalExtendedDimensions(arg); >-// } >-// } > } > > protected void handleArgumentComment(Argument arg) >@@ -4343,11 +4320,6 @@ > markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]); > markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd; > pushOnExpressionStack(markerAnnotation); >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- this.problemReporter().invalidUsageOfAnnotation(markerAnnotation); >- } > this.recordStringLiterals = true; > } > protected void consumeMemberValueArrayInitializer() { >@@ -4909,28 +4881,12 @@ > annotationRecoveryCheckPoint(normalAnnotation.sourceStart, normalAnnotation.declarationSourceEnd); > } > >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- this.problemReporter().invalidUsageOfAnnotation(normalAnnotation); >- } > this.recordStringLiterals = true; > } > protected void consumeOneDimLoop() { > // OneDimLoop ::= '[' ']' > this.dimensions++; > } >- >-protected void consumeOnlyTypeArguments() { >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- int length = this.genericsLengthStack[this.genericsLengthPtr]; >- this.problemReporter().invalidUsageOfTypeArguments( >- (TypeReference)this.genericsStack[this.genericsPtr - length + 1], >- (TypeReference)this.genericsStack[this.genericsPtr]); >- } >-} > protected void consumeOnlyTypeArgumentsForCastExpression() { > // OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments > } >@@ -6489,11 +6445,6 @@ > annotationRecoveryCheckPoint(singleMemberAnnotation.sourceStart, singleMemberAnnotation.declarationSourceEnd); > } > >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- this.problemReporter().invalidUsageOfAnnotation(singleMemberAnnotation); >- } > this.recordStringLiterals = true; > } > protected void consumeSingleStaticImportDeclarationName() { >@@ -6526,7 +6477,6 @@ > this.options.sourceLevel < ClassFileConstants.JDK1_5 && > this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { > impt.modifiers = ClassFileConstants.AccDefault; // convert the static import reference to a non-static importe reference >- this.problemReporter().invalidUsageOfStaticImports(impt); > } > > // recovery >@@ -6885,7 +6835,6 @@ > options.sourceLevel < ClassFileConstants.JDK1_5 && > this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { > impt.modifiers = ClassFileConstants.AccDefault; // convert the static import reference to a non-static importe reference >- this.problemReporter().invalidUsageOfStaticImports(impt); > } > > // recovery >@@ -7348,15 +7297,6 @@ > protected void consumeTypeArguments() { > concatGenericsLists(); > intPtr--; >- >- if(!this.statementRecoveryActivated && >- options.sourceLevel < ClassFileConstants.JDK1_5 && >- this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >- int length = this.genericsLengthStack[this.genericsLengthPtr]; >- this.problemReporter().invalidUsageOfTypeArguments( >- (TypeReference)this.genericsStack[this.genericsPtr - length + 1], >- (TypeReference)this.genericsStack[this.genericsPtr]); >- } > } > protected void consumeTypeDeclarations() { > // TypeDeclarations ::= TypeDeclarations TypeDeclaration >Index: src/org/eclipse/wst/jsdt/internal/compiler/SourceElementParser.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/SourceElementParser.java,v >retrieving revision 1.32 >diff -u -r1.32 SourceElementParser.java >--- src/org/eclipse/wst/jsdt/internal/compiler/SourceElementParser.java 21 Aug 2008 21:17:07 -0000 1.32 >+++ src/org/eclipse/wst/jsdt/internal/compiler/SourceElementParser.java 6 Apr 2009 18:29:54 -0000 >@@ -706,7 +706,6 @@ > this.options.sourceLevel < ClassFileConstants.JDK1_5 && > this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { > impt.modifiers = ClassFileConstants.AccDefault; // convert the static import reference to a non-static importe reference >- this.problemReporter().invalidUsageOfStaticImports(impt); > } > > // recovery >@@ -801,7 +800,6 @@ > options.sourceLevel < ClassFileConstants.JDK1_5 && > this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { > impt.modifiers = ClassFileConstants.AccDefault; // convert the static import reference to a non-static importe reference >- this.problemReporter().invalidUsageOfStaticImports(impt); > } > > // recovery >Index: src/org/eclipse/wst/jsdt/internal/compiler/impl/CompilerOptions.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/impl/CompilerOptions.java,v >retrieving revision 1.16 >diff -u -r1.16 CompilerOptions.java >--- src/org/eclipse/wst/jsdt/internal/compiler/impl/CompilerOptions.java 12 Mar 2009 05:00:40 -0000 1.16 >+++ src/org/eclipse/wst/jsdt/internal/compiler/impl/CompilerOptions.java 6 Apr 2009 18:29:55 -0000 >@@ -84,8 +84,6 @@ > public static final String OPTION_ReportUncheckedTypeOperation = "org.eclipse.wst.jsdt.core.compiler.problem.uncheckedTypeOperation"; //$NON-NLS-1$ > public static final String OPTION_ReportRawTypeReference = "org.eclipse.wst.jsdt.core.compiler.problem.rawTypeReference"; //$NON-NLS-1$ > public static final String OPTION_ReportFinalParameterBound = "org.eclipse.wst.jsdt.core.compiler.problem.finalParameterBound"; //$NON-NLS-1$ >- public static final String OPTION_ReportSwitchCaseShouldBeConstant = "org.eclipse.wst.jsdt.core.compiler.problem.SwitchCaseShouldBeConstant"; //$NON-NLS-1$ >- public static final String OPTION_ReportVarargsArgumentNeedCast = "org.eclipse.wst.jsdt.core.compiler.problem.varargsArgumentNeedCast"; //$NON-NLS-1$ > public static final String OPTION_Source = "org.eclipse.wst.jsdt.core.compiler.source"; //$NON-NLS-1$ > public static final String OPTION_TargetPlatform = "org.eclipse.wst.jsdt.core.compiler.codegen.targetPlatform"; //$NON-NLS-1$ > public static final String OPTION_Compliance = "org.eclipse.wst.jsdt.core.compiler.compliance"; //$NON-NLS-1$ >@@ -100,14 +98,9 @@ > public static final String OPTION_ReportDuplicateLocalVariables = "org.eclipse.wst.jsdt.core.compiler.problem.duplicateLocalVariables"; //$NON-NLS-1$ > public static final String OPTION_ReportRedundantNullCheck = "org.eclipse.wst.jsdt.core.compiler.problem.redundantNullCheck"; //$NON-NLS-1$ > public static final String OPTION_ReportAutoboxing = "org.eclipse.wst.jsdt.core.compiler.problem.autoboxing"; //$NON-NLS-1$ >- public static final String OPTION_ReportAnnotationSuperInterface = "org.eclipse.wst.jsdt.core.compiler.problem.annotationSuperInterface"; //$NON-NLS-1$ >- public static final String OPTION_ReportMissingOverrideAnnotation = "org.eclipse.wst.jsdt.core.compiler.problem.missingOverrideAnnotation"; //$NON-NLS-1$ >- public static final String OPTION_ReportMissingDeprecatedAnnotation = "org.eclipse.wst.jsdt.core.compiler.problem.missingDeprecatedAnnotation"; //$NON-NLS-1$ >- public static final String OPTION_ReportIncompleteEnumSwitch = "org.eclipse.wst.jsdt.core.compiler.problem.incompleteEnumSwitch"; //$NON-NLS-1$ > public static final String OPTION_ReportForbiddenReference = "org.eclipse.wst.jsdt.core.compiler.problem.forbiddenReference"; //$NON-NLS-1$ > public static final String OPTION_ReportDiscouragedReference = "org.eclipse.wst.jsdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$ > public static final String OPTION_SuppressWarnings = "org.eclipse.wst.jsdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$ >- public static final String OPTION_ReportUnhandledWarningToken = "org.eclipse.wst.jsdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$ > public static final String OPTION_ReportUnusedLabel = "org.eclipse.wst.jsdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ > public static final String OPTION_FatalOptionalError = "org.eclipse.wst.jsdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$ > public static final String OPTION_ReportParameterAssignment = "org.eclipse.wst.jsdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$ >@@ -197,19 +190,12 @@ > public static final long FinalParameterBound = ASTNode.Bit32L; > //TODO: remove MissingSerialVersion > public static final long MissingSerialVersion = ASTNode.Bit33L; >- public static final long SwitchCaseShouldBeConstant = ASTNode.Bit33L; > public static final long EnumUsedAsAnIdentifier = ASTNode.Bit34L; > public static final long ForbiddenReference = ASTNode.Bit35L; >- public static final long VarargsArgumentNeedCast = ASTNode.Bit36L; > public static final long NullReference = ASTNode.Bit37L; > public static final long AutoBoxing = ASTNode.Bit38L; >- public static final long AnnotationSuperInterface = ASTNode.Bit39L; > public static final long TypeHiding = ASTNode.Bit40L; >- public static final long MissingOverrideAnnotation = ASTNode.Bit41L; >- public static final long IncompleteEnumSwitch = ASTNode.Bit42L; >- public static final long MissingDeprecatedAnnotation = ASTNode.Bit43L; > public static final long DiscouragedReference = ASTNode.Bit44L; >- public static final long UnhandledWarningToken = ASTNode.Bit45L; > public static final long RawTypeReference = ASTNode.Bit46L; > public static final long UnusedLabel = ASTNode.Bit47L; > public static final long ParameterAssignment = ASTNode.Bit48L; >@@ -253,14 +239,10 @@ > | EnumUsedAsAnIdentifier > | UncheckedTypeOperation > | RawTypeReference >- | SwitchCaseShouldBeConstant >- | VarargsArgumentNeedCast > | ForbiddenReference > | DiscouragedReference >- | AnnotationSuperInterface > | TypeHiding > | FinalParameterBound >- | UnhandledWarningToken > | UnusedLocalVariable > | UnusedPrivateMember > | UnusedLabel >@@ -424,8 +406,6 @@ > optionsMap.put(OPTION_ReportUnnecessaryTypeCheck, getSeverityString(UnnecessaryTypeCheck)); > optionsMap.put(OPTION_ReportUnnecessaryElse, getSeverityString(UnnecessaryElse)); > optionsMap.put(OPTION_ReportAutoboxing, getSeverityString(AutoBoxing)); >- optionsMap.put(OPTION_ReportAnnotationSuperInterface, getSeverityString(AnnotationSuperInterface)); >- optionsMap.put(OPTION_ReportIncompleteEnumSwitch, getSeverityString(IncompleteEnumSwitch)); > optionsMap.put(OPTION_ReportInvalidJavadoc, getSeverityString(InvalidJavadoc)); > optionsMap.put(OPTION_ReportInvalidJavadocTagsVisibility, getVisibilityString(this.reportInvalidJavadocTagsVisibility)); > optionsMap.put(OPTION_ReportInvalidJavadocTags, this.reportInvalidJavadocTags ? ENABLED : DISABLED); >@@ -444,13 +424,8 @@ > optionsMap.put(OPTION_ReportUncheckedTypeOperation, getSeverityString(UncheckedTypeOperation)); > optionsMap.put(OPTION_ReportRawTypeReference, getSeverityString(RawTypeReference)); > optionsMap.put(OPTION_ReportFinalParameterBound, getSeverityString(FinalParameterBound)); >- optionsMap.put(OPTION_ReportSwitchCaseShouldBeConstant, getSeverityString(SwitchCaseShouldBeConstant)); > optionsMap.put(OPTION_ReportForbiddenReference, getSeverityString(ForbiddenReference)); > optionsMap.put(OPTION_ReportDiscouragedReference, getSeverityString(DiscouragedReference)); >- optionsMap.put(OPTION_ReportVarargsArgumentNeedCast, getSeverityString(VarargsArgumentNeedCast)); >- optionsMap.put(OPTION_ReportMissingOverrideAnnotation, getSeverityString(MissingOverrideAnnotation)); >- optionsMap.put(OPTION_ReportMissingDeprecatedAnnotation, getSeverityString(MissingDeprecatedAnnotation)); >- optionsMap.put(OPTION_ReportIncompleteEnumSwitch, getSeverityString(IncompleteEnumSwitch)); > optionsMap.put(OPTION_ReportUnusedLabel, getSeverityString(UnusedLabel)); > optionsMap.put(OPTION_Compliance, versionFromJdkLevel(this.complianceLevel)); > optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); >@@ -473,7 +448,6 @@ > optionsMap.put(OPTION_ReportDuplicateLocalVariables, getSeverityString(DuplicateLocalVariables)); > optionsMap.put(OPTION_ReportRedundantNullCheck, getSeverityString(RedundantNullCheck)); > optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); >- optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); > optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); > optionsMap.put(OPTION_ReportFallthroughCase, getSeverityString(FallthroughCase)); > optionsMap.put(OPTION_ReportOverridingMethodWithoutSuperInvocation, getSeverityString(OverridingMethodWithoutSuperInvocation)); >@@ -575,14 +549,10 @@ > } else { > irritantInt = (int)(irritant >>> 32); > switch (irritantInt) { >- case (int)(SwitchCaseShouldBeConstant >>> 32) : >- return OPTION_ReportSwitchCaseShouldBeConstant ; > case (int)(EnumUsedAsAnIdentifier >>> 32) : > return OPTION_ReportEnumIdentifier; > case (int)(ForbiddenReference >>> 32) : > return OPTION_ReportForbiddenReference; >- case (int)(VarargsArgumentNeedCast >>> 32) : >- return OPTION_ReportVarargsArgumentNeedCast; > case (int)(NullReference >>> 32) : > return OPTION_ReportNullReference; > case (int)(PotentialNullReference >>> 32) : >@@ -593,20 +563,10 @@ > return OPTION_ReportRedundantNullCheck; > case (int)(AutoBoxing >>> 32) : > return OPTION_ReportAutoboxing; >- case (int)(AnnotationSuperInterface >>> 32) : >- return OPTION_ReportAnnotationSuperInterface; > case (int)(TypeHiding >>> 32) : > return OPTION_ReportTypeParameterHiding; >- case (int)(MissingOverrideAnnotation >>> 32) : >- return OPTION_ReportMissingOverrideAnnotation; >- case (int)(IncompleteEnumSwitch >>> 32) : >- return OPTION_ReportIncompleteEnumSwitch; >- case (int)(MissingDeprecatedAnnotation >>> 32) : >- return OPTION_ReportMissingDeprecatedAnnotation; > case (int)(DiscouragedReference >>> 32) : > return OPTION_ReportDiscouragedReference; >- case (int)(UnhandledWarningToken >>> 32) : >- return OPTION_ReportUnhandledWarningToken; > case (int)(RawTypeReference >>> 32) : > return OPTION_ReportRawTypeReference; > case (int)(UnusedLabel >>> 32) : >@@ -896,20 +856,13 @@ > if ((optionValue = optionsMap.get(OPTION_ReportUncheckedTypeOperation)) != null) updateSeverity(UncheckedTypeOperation, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportRawTypeReference)) != null) updateSeverity(RawTypeReference, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportFinalParameterBound)) != null) updateSeverity(FinalParameterBound, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportSwitchCaseShouldBeConstant)) != null) updateSeverity(SwitchCaseShouldBeConstant, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportForbiddenReference)) != null) updateSeverity(ForbiddenReference, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportDiscouragedReference)) != null) updateSeverity(DiscouragedReference, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportVarargsArgumentNeedCast)) != null) updateSeverity(VarargsArgumentNeedCast, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportNullReference)) != null) updateSeverity(NullReference, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportPotentialNullReference)) != null) updateSeverity(PotentialNullReference, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportDuplicateLocalVariables)) != null) updateSeverity(DuplicateLocalVariables, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportRedundantNullCheck)) != null) updateSeverity(RedundantNullCheck, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportAutoboxing)) != null) updateSeverity(AutoBoxing, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportAnnotationSuperInterface)) != null) updateSeverity(AnnotationSuperInterface, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportMissingOverrideAnnotation)) != null) updateSeverity(MissingOverrideAnnotation, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportMissingDeprecatedAnnotation)) != null) updateSeverity(MissingDeprecatedAnnotation, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportIncompleteEnumSwitch)) != null) updateSeverity(IncompleteEnumSwitch, optionValue); >- if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); > if ((optionValue = optionsMap.get(OPTION_ReportFallthroughCase)) != null) updateSeverity(FallthroughCase, optionValue); >@@ -1099,8 +1052,6 @@ > buf.append("\n\t- unsafe type operation: ").append(getSeverityString(UncheckedTypeOperation)); //$NON-NLS-1$ > buf.append("\n\t- unsafe raw type: ").append(getSeverityString(RawTypeReference)); //$NON-NLS-1$ > buf.append("\n\t- final bound for type parameter: ").append(getSeverityString(FinalParameterBound)); //$NON-NLS-1$ >- buf.append("\n\t- missing serialVersionUID: ").append(getSeverityString(SwitchCaseShouldBeConstant)); //$NON-NLS-1$ >- buf.append("\n\t- varargs argument need cast: ").append(getSeverityString(VarargsArgumentNeedCast)); //$NON-NLS-1$ > buf.append("\n\t- forbidden reference to type with access restriction: ").append(getSeverityString(ForbiddenReference)); //$NON-NLS-1$ > buf.append("\n\t- discouraged reference to type with access restriction: ").append(getSeverityString(DiscouragedReference)); //$NON-NLS-1$ > buf.append("\n\t- null reference: ").append(getSeverityString(NullReference)); //$NON-NLS-1$ >@@ -1108,12 +1059,7 @@ > buf.append("\n\t- duplicate local variables: ").append(getSeverityString(DuplicateLocalVariables)); //$NON-NLS-1% > buf.append("\n\t- redundant null check: ").append(getSeverityString(RedundantNullCheck)); //$NON-NLS-1$ > buf.append("\n\t- autoboxing: ").append(getSeverityString(AutoBoxing)); //$NON-NLS-1$ >- buf.append("\n\t- annotation super interface: ").append(getSeverityString(AnnotationSuperInterface)); //$NON-NLS-1$ >- buf.append("\n\t- missing @Override annotation: ").append(getSeverityString(MissingOverrideAnnotation)); //$NON-NLS-1$ >- buf.append("\n\t- missing @Deprecated annotation: ").append(getSeverityString(MissingDeprecatedAnnotation)); //$NON-NLS-1$ >- buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$ > buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$ >- buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ > buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ > buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ > buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ >@@ -1206,7 +1152,6 @@ > */ > public static String[] warningOptionNames() { > String[] result = { >- OPTION_ReportAnnotationSuperInterface, > OPTION_ReportAssertIdentifier, > OPTION_ReportAutoboxing, > OPTION_ReportDeprecation, >@@ -1220,16 +1165,12 @@ > OPTION_ReportForbiddenReference, > OPTION_ReportHiddenCatchBlock, > OPTION_ReportIncompatibleNonInheritedInterfaceMethod, >- OPTION_ReportIncompleteEnumSwitch, > OPTION_ReportIndirectStaticAccess, > OPTION_ReportInvalidJavadoc, > OPTION_ReportLocalVariableHiding, > OPTION_ReportMethodWithConstructorName, >- OPTION_ReportMissingDeprecatedAnnotation, > OPTION_ReportMissingJavadocComments, > OPTION_ReportMissingJavadocTags, >- OPTION_ReportMissingOverrideAnnotation, >- OPTION_ReportSwitchCaseShouldBeConstant, > OPTION_ReportNoEffectAssignment, > OPTION_ReportNoImplicitStringConversion, > OPTION_ReportNonExternalizedStringLiteral, >@@ -1252,8 +1193,6 @@ > OPTION_ReportUnusedLocal, > OPTION_ReportUnusedParameter, > OPTION_ReportUnusedPrivateMember, >- OPTION_ReportVarargsArgumentNeedCast, >- OPTION_ReportUnhandledWarningToken, > OPTION_ReportOverridingMethodWithoutSuperInvocation > }; > return result; >@@ -1295,16 +1234,10 @@ > } else { > irritantInt = (int)(irritant >>> 32); > switch (irritantInt) { >- case (int)(SwitchCaseShouldBeConstant >>> 32) : >- return "serial"; //$NON-NLS-1$ > case (int)(AutoBoxing >>> 32) : > return "boxing"; //$NON-NLS-1$ > case (int)(TypeHiding >>> 32) : > return "hiding"; //$NON-NLS-1$ >- case (int)(IncompleteEnumSwitch >>> 32) : >- return "incomplete-switch"; //$NON-NLS-1$ >- case (int)(MissingDeprecatedAnnotation >>> 32) : >- return "dep-ann"; //$NON-NLS-1$ > case (int)(RawTypeReference >>> 32): > return "unchecked"; //$NON-NLS-1$ > case (int) (UnusedLabel >>> 32): >@@ -1329,16 +1262,13 @@ > "all", //$NON-NLS-1$ > "boxing", //$NON-NLS-1$ > "cast", //$NON-NLS-1$ >- "dep-ann", //$NON-NLS-1$ > "deprecation", //$NON-NLS-1$ > "fallthrough", //$NON-NLS-1$ > "finally", //$NON-NLS-1$ > "hiding", //$NON-NLS-1$ >- "incomplete-switch", //$NON-NLS-1$ > "nls", //$NON-NLS-1$ > "null", //$NON-NLS-1$ > "restriction", //$NON-NLS-1$ >- "serial", //$NON-NLS-1$ > "static-access", //$NON-NLS-1$ > "super", //$NON-NLS-1$ > "synthetic-access", //$NON-NLS-1$ >@@ -1365,8 +1295,6 @@ > case 'd' : > if ("deprecation".equals(warningToken)) //$NON-NLS-1$ > return UsingDeprecatedAPI; >- if ("dep-ann".equals(warningToken)) //$NON-NLS-1$ >- return MissingDeprecatedAnnotation; > break; > case 'f' : > if ("fallthrough".equals(warningToken)) //$NON-NLS-1$ >@@ -1377,9 +1305,6 @@ > case 'h' : > if ("hiding".equals(warningToken)) //$NON-NLS-1$ > return FieldHiding | LocalVariableHiding | MaskedCatchBlock | TypeHiding; >- case 'i' : >- if ("incomplete-switch".equals(warningToken)) //$NON-NLS-1$ >- return IncompleteEnumSwitch; > break; > case 'n' : > if ("nls".equals(warningToken)) //$NON-NLS-1$ >@@ -1392,8 +1317,6 @@ > return DiscouragedReference | ForbiddenReference; > break; > case 's' : >- if ("serial".equals(warningToken)) //$NON-NLS-1$ >- return SwitchCaseShouldBeConstant; > if ("static-access".equals(warningToken)) //$NON-NLS-1$ > return IndirectStaticAccess | NonStaticAccessToStatic; > if ("synthetic-access".equals(warningToken)) //$NON-NLS-1$
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thatnitind
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 268542
:
128725
|
128978
|
130703
| 131032