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 33207 Details for
Bug 124119
[1.5][compiler] NPE recompiling in method verifier during annotation cycle detection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Intermediate patch
124119.txt (text/plain), 56.09 KB, created by
Philipe Mulet
on 2006-01-18 09:07:44 EST
(
hide
)
Description:
Intermediate patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2006-01-18 09:07:44 EST
Size:
56.09 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java,v >retrieving revision 1.6 >diff -u -r1.6 CompletionOnParameterizedQualifiedTypeReference.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java 28 Jul 2005 16:33:23 -0000 1.6 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java 18 Jan 2006 14:01:05 -0000 >@@ -72,13 +72,13 @@ > return this.kind == K_EXCEPTION; > } > >- public TypeBinding resolveType(BlockScope scope, boolean checkBounds) { >- super.resolveType(scope, checkBounds); >+ public TypeBinding resolveType(BlockScope scope, int mode) { >+ super.resolveType(scope, mode); > throw new CompletionNodeFound(this, this.resolvedType, scope); > } > >- public TypeBinding resolveType(ClassScope scope) { >- super.resolveType(scope); >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { >+ super.resolveType(scope, checkMode); > throw new CompletionNodeFound(this, this.resolvedType, scope); > } > >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java,v >retrieving revision 1.21 >diff -u -r1.21 CompletionOnQualifiedAllocationExpression.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java 23 Feb 2005 02:47:28 -0000 1.21 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java 18 Jan 2006 14:01:05 -0000 >@@ -56,7 +56,7 @@ > if (this.resolvedType.isInterface()) // handle the anonymous class definition case > this.resolvedType = scope.getJavaLangObject(); > } else { >- this.resolvedType = type.resolveType(scope, true /* check bounds*/); >+ this.resolvedType = type.resolveType(scope, TypeReference.CHECK_ALL); > if (!(this.resolvedType instanceof ReferenceBinding)) > throw new CompletionNodeFound(); // no need to continue if its an array or base type > } >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java,v >retrieving revision 1.1 >diff -u -r1.1 CompletionOnStringLiteral.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java 10 Nov 2005 12:53:56 -0000 1.1 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java 18 Jan 2006 14:01:05 -0000 >@@ -47,7 +47,7 @@ > this.contentStart = cs; > this.contentEnd = ce; > } >- public TypeBinding resolveType(ClassScope scope) { >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { > throw new CompletionNodeFound(this, null, scope); > } > public TypeBinding resolveType(BlockScope scope) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java,v >retrieving revision 1.5 >diff -u -r1.5 JavadocImplicitTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java 18 Nov 2005 16:46:21 -0000 1.5 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java 18 Jan 2006 14:01:07 -0000 >@@ -57,7 +57,7 @@ > * Resolves type on a Block, Class or CompilationUnit scope. > * We need to modify resoling behavior to avoid raw type creation. > */ >- private TypeBinding internalResolveType(Scope scope) { >+ private TypeBinding internalResolveType(Scope scope, int checkMode) { > // handle the error here > this.constant = Constant.NotAConstant; > if (this.resolvedType != null) // is a shared type reference which was already resolved >@@ -70,17 +70,18 @@ > reportInvalidType(scope); > return null; > } >- if (isTypeUseDeprecated(this.resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(this.resolvedType, scope)){ > reportDeprecatedType(scope); >+ } > return this.resolvedType; > } > >- public TypeBinding resolveType(BlockScope blockScope, boolean checkBounds) { >- return internalResolveType(blockScope); >+ public TypeBinding resolveType(BlockScope blockScope, int checkMode) { >+ return internalResolveType(blockScope, checkMode); > } > >- public TypeBinding resolveType(ClassScope classScope) { >- return internalResolveType(classScope); >+ public TypeBinding resolveType(ClassScope classScope, int checkMode) { >+ return internalResolveType(classScope, checkMode); > } > > public void traverse(ASTVisitor visitor, BlockScope classScope) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java,v >retrieving revision 1.50 >diff -u -r1.50 ExplicitConstructorCall.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 10 Jan 2006 14:37:27 -0000 1.50 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 18 Jan 2006 14:01:06 -0000 >@@ -291,7 +291,7 @@ > boolean argHasError = false; // typeChecks all arguments > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { >+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, TypeReference.CHECK_ALL)) == null) { > argHasError = true; > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java,v >retrieving revision 1.19 >diff -u -r1.19 JavadocFieldReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 18 Nov 2005 16:46:21 -0000 1.19 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 18 Jan 2006 14:01:07 -0000 >@@ -119,7 +119,7 @@ > return internalResolveType(scope); > } > >- public TypeBinding resolveType(ClassScope scope) { >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { > return internalResolveType(scope); > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java,v >retrieving revision 1.15 >diff -u -r1.15 JavadocArgumentExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java 18 Nov 2005 16:46:22 -0000 1.15 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java 18 Jan 2006 14:01:07 -0000 >@@ -77,7 +77,7 @@ > return internalResolveType(scope); > } > >- public TypeBinding resolveType(ClassScope scope) { >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { > return internalResolveType(scope); > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java,v >retrieving revision 1.57 >diff -u -r1.57 AllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 10 Jan 2006 14:37:27 -0000 1.57 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 18 Jan 2006 14:01:06 -0000 >@@ -239,7 +239,7 @@ > // initialization of an enum constant > this.resolvedType = scope.enclosingReceiverType(); > } else { >- this.resolvedType = this.type.resolveType(scope, true /* check bounds*/); >+ this.resolvedType = this.type.resolveType(scope, TypeReference.CHECK_ALL); > checkParameterizedAllocation: { > if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>() > ReferenceBinding currentType = (ReferenceBinding)this.resolvedType; >@@ -267,7 +267,7 @@ > boolean argHasError = false; // typeChecks all arguments > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { >+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, TypeReference.CHECK_ALL)) == null) { > argHasError = true; > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java,v >retrieving revision 1.7 >diff -u -r1.7 TypeParameter.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java 7 Jul 2005 10:44:02 -0000 1.7 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java 18 Jan 2006 14:01:09 -0000 >@@ -23,25 +23,16 @@ > public TypeVariableBinding binding; > public TypeReference[] bounds; > >+ public void generateCode(BlockScope currentScope, CodeStream codeStream) { >+ // nothing to do >+ } >+ > /** > * @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind() > */ > public int getKind() { > return TYPE_PARAMETER; > } >- >- public void checkBounds(Scope scope) { >- >- if (this.type != null) { >- this.type.checkBounds(scope); >- } >- if (this.bounds != null) { >- for (int i = 0, length = this.bounds.length; i < length; i++) { >- this.bounds[i].checkBounds(scope); >- } >- } >- } >- > private void internalResolve(Scope scope, boolean staticContext) { > // detect variable/type name collisions > if (this.binding != null) { >@@ -55,14 +46,25 @@ > } > } > >- public void resolve(BlockScope scope) { >- internalResolve(scope, scope.methodScope().isStatic); >+ public void performDeferredCheck(Scope scope) { >+ >+ if (this.type != null) { >+ this.type.checkBounds(scope); >+ if (this.type.isTypeUseDeprecated(this.type.resolvedType, scope)) { >+ this.type.reportDeprecatedType(scope); >+ } >+ } >+ if (this.bounds != null) { >+ for (int i = 0, length = this.bounds.length; i < length; i++) { >+ TypeReference bound = this.bounds[i]; >+ bound.checkBounds(scope); >+ if (bound.isTypeUseDeprecated(bound.resolvedType, scope)) { >+ bound.reportDeprecatedType(scope); >+ } >+ } >+ } > } > >- public void resolve(ClassScope scope) { >- internalResolve(scope, scope.enclosingSourceType().isStatic()); >- } >- > /* (non-Javadoc) > * @see org.eclipse.jdt.internal.compiler.ast.AstNode#print(int, java.lang.StringBuffer) > */ >@@ -80,9 +82,13 @@ > } > return output; > } >+ >+ public void resolve(BlockScope scope) { >+ internalResolve(scope, scope.methodScope().isStatic); >+ } > >- public void generateCode(BlockScope currentScope, CodeStream codeStream) { >- // nothing to do >+ public void resolve(ClassScope scope) { >+ internalResolve(scope, scope.enclosingSourceType().isStatic()); > } > > public void traverse(ASTVisitor visitor, BlockScope scope) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java,v >retrieving revision 1.107 >diff -u -r1.107 MessageSend.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 10 Jan 2006 14:37:27 -0000 1.107 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 18 Jan 2006 14:01:08 -0000 >@@ -316,7 +316,7 @@ > boolean argHasError = false; // typeChecks all arguments > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { >+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, TypeReference.CHECK_ALL)) == null) { > argHasError = true; > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java,v >retrieving revision 1.30 >diff -u -r1.30 ParameterizedSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 10 Jan 2006 14:37:27 -0000 1.30 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 18 Jan 2006 14:01:08 -0000 >@@ -85,7 +85,7 @@ > /* > * No need to check for reference to raw type per construction > */ >- private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) { >+ private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, int checkMode) { > > // handle the error here > this.constant = Constant.NotAConstant; >@@ -114,8 +114,9 @@ > scope.problemReporter().invalidEnclosingType(this, this.resolvedType, enclosingType); > return null; > } >- if (isTypeUseDeprecated(this.resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(this.resolvedType, scope)) { > scope.problemReporter().deprecatedType(this.resolvedType, this); >+ } > } > > // check generic and arity >@@ -162,8 +163,9 @@ > > ParameterizedTypeBinding parameterizedType = scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), argTypes, enclosingType); > // check argument type compatibility >- if (checkBounds) // otherwise will do it in Scope.connectTypeVariables() or generic method resolution >+ if ((checkMode & CHECK_NO_BOUND) == 0){ // otherwise will do it in Scope.connectTypeVariables() or generic method resolution > parameterizedType.boundCheck(scope, this.typeArguments); >+ } > > this.resolvedType = parameterizedType; > if (isTypeUseDeprecated(this.resolvedType, scope)) >@@ -201,16 +203,16 @@ > return output; > } > >- public TypeBinding resolveType(BlockScope scope, boolean checkBounds) { >- return internalResolveType(scope, null, checkBounds); >+ public TypeBinding resolveType(BlockScope scope, int checkMode) { >+ return internalResolveType(scope, null, checkMode); > } > >- public TypeBinding resolveType(ClassScope scope) { >- return internalResolveType(scope, null, false /*no bounds check in classScope*/); >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { >+ return internalResolveType(scope, null, checkMode|CHECK_NO_BOUND); > } > > public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) { >- return internalResolveType(scope, enclosingType, true/*check bounds*/); >+ return internalResolveType(scope, enclosingType, CHECK_ALL); > } > > public void traverse(ASTVisitor visitor, BlockScope scope) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java,v >retrieving revision 1.32 >diff -u -r1.32 ParameterizedQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 10 Jan 2006 14:37:27 -0000 1.32 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 18 Jan 2006 14:01:08 -0000 >@@ -107,7 +107,7 @@ > /* > * No need to check for reference to raw type per construction > */ >- private TypeBinding internalResolveType(Scope scope, boolean checkBounds) { >+ private TypeBinding internalResolveType(Scope scope, int checkMode) { > > // handle the error here > this.constant = Constant.NotAConstant; >@@ -194,8 +194,9 @@ > } > ParameterizedTypeBinding parameterizedType = scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), argTypes, qualifiedType); > // check argument type compatibility >- if (checkBounds) // otherwise will do it in Scope.connectTypeVariables() or generic method resolution >+ if ((checkMode & CHECK_NO_BOUND) == 0){ // otherwise will do it in Scope.connectTypeVariables() or generic method resolution > parameterizedType.boundCheck(scope, args); >+ } > qualifiedType = parameterizedType; > } else { > if (isClassScope) >@@ -215,8 +216,9 @@ > } > } > this.resolvedType = qualifiedType; >- if (isTypeUseDeprecated(this.resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(this.resolvedType, scope)) { > reportDeprecatedType(scope); >+ } > // array type ? > if (this.dimensions > 0) { > if (dimensions > 255) >@@ -268,11 +270,11 @@ > return output; > } > >- public TypeBinding resolveType(BlockScope scope, boolean checkBounds) { >- return internalResolveType(scope, checkBounds); >+ public TypeBinding resolveType(BlockScope scope, int checkMode) { >+ return internalResolveType(scope, checkMode); > } >- public TypeBinding resolveType(ClassScope scope) { >- return internalResolveType(scope, false); >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { >+ return internalResolveType(scope, checkMode|CHECK_NO_BOUND); > } > public void traverse(ASTVisitor visitor, BlockScope scope) { > if (visitor.visit(this, scope)) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java,v >retrieving revision 1.7 >diff -u -r1.7 JavadocArraySingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java 23 Feb 2005 02:47:28 -0000 1.7 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java 18 Jan 2006 14:01:07 -0000 >@@ -26,7 +26,7 @@ > protected void reportInvalidType(Scope scope) { > scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers()); > } >- protected void reportDeprecatedType(Scope scope) { >+ public void reportDeprecatedType(Scope scope) { > scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers()); > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java,v >retrieving revision 1.40 >diff -u -r1.40 ClassLiteralAccess.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java 10 Jan 2006 14:37:27 -0000 1.40 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java 18 Jan 2006 14:01:06 -0000 >@@ -76,7 +76,7 @@ > public TypeBinding resolveType(BlockScope scope) { > > constant = Constant.NotAConstant; >- if ((targetType = type.resolveType(scope, true /* check bounds*/)) == null) >+ if ((targetType = type.resolveType(scope, TypeReference.CHECK_ALL)) == null) > return null; > > if (targetType.isArrayType() >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java,v >retrieving revision 1.50 >diff -u -r1.50 Argument.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java 18 Nov 2005 16:46:21 -0000 1.50 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java 18 Jan 2006 14:01:06 -0000 >@@ -99,7 +99,7 @@ > // provide the scope with a side effect : insertion of a LOCAL > // that represents the argument. The type must be from JavaThrowable > >- TypeBinding exceptionType = this.type.resolveType(scope, true /* check bounds*/); >+ TypeBinding exceptionType = this.type.resolveType(scope, TypeReference.CHECK_ALL); > if (exceptionType == null) return null; > if (exceptionType.isBoundParameterizedType()) { > scope.problemReporter().invalidParameterizedExceptionType(exceptionType, this); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java,v >retrieving revision 1.25 >diff -u -r1.25 JavadocMessageSend.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java 10 Jan 2006 14:37:27 -0000 1.25 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java 18 Jan 2006 14:01:07 -0000 >@@ -198,7 +198,7 @@ > return internalResolveType(scope); > } > >- public TypeBinding resolveType(ClassScope scope) { >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { > return internalResolveType(scope); > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java,v >retrieving revision 1.15 >diff -u -r1.15 JavadocQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java 18 Nov 2005 16:46:21 -0000 1.15 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java 18 Jan 2006 14:01:08 -0000 >@@ -30,7 +30,7 @@ > protected void reportInvalidType(Scope scope) { > scope.problemReporter().javadocInvalidType(this, resolvedType, scope.getDeclarationModifiers()); > } >- protected void reportDeprecatedType(Scope scope) { >+ public void reportDeprecatedType(Scope scope) { > scope.problemReporter().javadocDeprecatedType(resolvedType, this, scope.getDeclarationModifiers()); > } > >@@ -50,7 +50,7 @@ > /* > * We need to modify resolving behavior to handle package references > */ >- private TypeBinding internalResolveType(Scope scope, boolean checkBounds) { >+ private TypeBinding internalResolveType(Scope scope, int checkMode) { > // handle the error here > constant = Constant.NotAConstant; > if (resolvedType != null) // is a shared type reference which was already resolved >@@ -66,19 +66,20 @@ > } > return null; > } >- if (isTypeUseDeprecated(resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(resolvedType, scope)) { > reportDeprecatedType(scope); >+ } > if (resolvedType instanceof ParameterizedTypeBinding) { > resolvedType = ((ParameterizedTypeBinding)resolvedType).type; > } > return resolvedType; > } > >- public TypeBinding resolveType(BlockScope blockScope, boolean checkBounds) { >- return internalResolveType(blockScope, checkBounds); >+ public TypeBinding resolveType(BlockScope blockScope, int checkMode) { >+ return internalResolveType(blockScope, checkMode); > } > >- public TypeBinding resolveType(ClassScope classScope) { >- return internalResolveType(classScope, false); >+ public TypeBinding resolveType(ClassScope classScope, int checkMode) { >+ return internalResolveType(classScope, CHECK_NO_BOUND); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java,v >retrieving revision 1.6 >diff -u -r1.6 Wildcard.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java 23 Feb 2005 02:47:27 -0000 1.6 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java 18 Jan 2006 14:01:09 -0000 >@@ -57,8 +57,8 @@ > TypeBinding boundType = null; > if (this.bound != null) { > boundType = scope.kind == Scope.CLASS_SCOPE >- ? this.bound.resolveType((ClassScope)scope) >- : this.bound.resolveType((BlockScope)scope, true /* check bounds*/); >+ ? this.bound.resolveType((ClassScope)scope, TypeReference.CHECK_ALL) >+ : this.bound.resolveType((BlockScope)scope, TypeReference.CHECK_ALL); > > if (boundType == null) { > return null; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v >retrieving revision 1.73 >diff -u -r1.73 QualifiedAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 10 Jan 2006 14:37:27 -0000 1.73 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 18 Jan 2006 14:01:09 -0000 >@@ -232,7 +232,7 @@ > // initialization of an enum constant > receiverType = scope.enclosingSourceType(); > } else { >- receiverType = this.type.resolveType(scope, true /* check bounds*/); >+ receiverType = this.type.resolveType(scope, TypeReference.CHECK_ALL); > checkParameterizedAllocation: { > if (receiverType == null) break checkParameterizedAllocation; > if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>() >@@ -271,7 +271,7 @@ > int length = this.typeArguments.length; > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- TypeBinding argType = this.typeArguments[i].resolveType(scope, true /* check bounds*/); >+ TypeBinding argType = this.typeArguments[i].resolveType(scope, TypeReference.CHECK_ALL); > if (argType == null) return null; // error already reported > this.genericTypeArguments[i] = argType; > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java,v >retrieving revision 1.7 >diff -u -r1.7 JavadocArrayQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java 23 Feb 2005 02:47:28 -0000 1.7 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java 18 Jan 2006 14:01:07 -0000 >@@ -28,7 +28,7 @@ > protected void reportInvalidType(Scope scope) { > scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers()); > } >- protected void reportDeprecatedType(Scope scope) { >+ public void reportDeprecatedType(Scope scope) { > scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers()); > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java,v >retrieving revision 1.25 >diff -u -r1.25 JavadocAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java 10 Jan 2006 14:37:27 -0000 1.25 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java 18 Jan 2006 14:01:07 -0000 >@@ -35,9 +35,9 @@ > if (this.type == null) { > this.resolvedType = scope.enclosingSourceType(); > } else if (scope.kind == Scope.CLASS_SCOPE) { >- this.resolvedType = this.type.resolveType((ClassScope)scope); >+ this.resolvedType = this.type.resolveType((ClassScope)scope, TypeReference.CHECK_ALL); > } else { >- this.resolvedType = this.type.resolveType((BlockScope)scope, true /* check bounds*/); >+ this.resolvedType = this.type.resolveType((BlockScope)scope, TypeReference.CHECK_ALL); > } > > // buffering the arguments' types >@@ -135,7 +135,7 @@ > return internalResolveType(scope); > } > >- public TypeBinding resolveType(ClassScope scope) { >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { > return internalResolveType(scope); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java,v >retrieving revision 1.36 >diff -u -r1.36 ArrayAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java 10 Jan 2006 14:37:27 -0000 1.36 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java 18 Jan 2006 14:01:06 -0000 >@@ -113,7 +113,7 @@ > // only at the -end- like new int [4][][]. The parser allows new int[][4][] > // so this must be checked here......(this comes from a reduction to LL1 grammar) > >- TypeBinding referenceType = type.resolveType(scope, true /* check bounds*/); >+ TypeBinding referenceType = type.resolveType(scope, TypeReference.CHECK_ALL); > > // will check for null after dimensions are checked > constant = Constant.NotAConstant; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java,v >retrieving revision 1.30 >diff -u -r1.30 TypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java 10 Jan 2006 14:37:27 -0000 1.30 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java 18 Jan 2006 14:01:09 -0000 >@@ -20,6 +20,12 @@ > > public abstract class TypeReference extends Expression { > >+ // Depending on location of type references, certain checks are deferred >+ // until later stages (i.e. when resolving super types or type variables) >+ public static final int CHECK_ALL = 0; >+ public static final int CHECK_NO_BOUND = 1; >+ public static final int CHECK_NO_DEPRECATION = 2; >+ > public TypeReference() { > super () ; > } >@@ -104,7 +110,7 @@ > } > public TypeBinding resolveSuperType(ClassScope scope) { > // assumes the implementation of resolveType(ClassScope) will call back to detect cycles >- if (resolveType(scope) == null) return null; >+ if (resolveType(scope, CHECK_NO_BOUND|CHECK_NO_DEPRECATION) == null) return null; > > if (this.resolvedType.isTypeVariable()) { > this.resolvedType = new ProblemReferenceBinding(getTypeName(), (ReferenceBinding) this.resolvedType, ProblemReasons.IllegalSuperTypeVariable); >@@ -115,10 +121,10 @@ > } > > public final TypeBinding resolveType(BlockScope blockScope) { >- return resolveType(blockScope, true /* checkbounds if any */); >+ return resolveType(blockScope, CHECK_ALL); > } > >-public TypeBinding resolveType(BlockScope scope, boolean checkBounds) { >+public TypeBinding resolveType(BlockScope scope, int checkMode) { > // handle the error here > this.constant = Constant.NotAConstant; > if (this.resolvedType != null) // is a shared type reference which was already resolved >@@ -131,8 +137,9 @@ > reportInvalidType(scope); > return null; > } >- if (isTypeUseDeprecated(this.resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(this.resolvedType, scope)) { > reportDeprecatedType(scope); >+ } > type = scope.environment().convertToRawType(type); > if (type.isRawType() > && (this.bits & IgnoreRawTypeCheck) == 0 >@@ -142,6 +149,9 @@ > return this.resolvedType = type; > } > public TypeBinding resolveType(ClassScope scope) { >+ return resolveType(scope, CHECK_NO_BOUND); >+} >+public TypeBinding resolveType(ClassScope scope, int checkMode) { > // handle the error here > this.constant = Constant.NotAConstant; > if (this.resolvedType != null) // is a shared type reference which was already resolved >@@ -154,8 +164,9 @@ > reportInvalidType(scope); > return null; > } >- if (isTypeUseDeprecated(this.resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(this.resolvedType, scope)) { > reportDeprecatedType(scope); >+ } > type = scope.environment().convertToRawType(type); > if (type.isRawType() > && (this.bits & IgnoreRawTypeCheck) == 0 >@@ -166,17 +177,17 @@ > } > > public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding genericType, int rank) { >- return resolveType(blockScope, true /* check bounds*/); >+ return resolveType(blockScope, TypeReference.CHECK_ALL); > } > > public TypeBinding resolveTypeArgument(ClassScope classScope, ReferenceBinding genericType, int rank) { >- return resolveType(classScope); >+ return resolveType(classScope, TypeReference.CHECK_ALL); > } > > protected void reportInvalidType(Scope scope) { > scope.problemReporter().invalidType(this, this.resolvedType); > } >-protected void reportDeprecatedType(Scope scope) { >+public void reportDeprecatedType(Scope scope) { > scope.problemReporter().deprecatedType(this.resolvedType, this); > } > public abstract void traverse(ASTVisitor visitor, ClassScope classScope); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v >retrieving revision 1.38 >diff -u -r1.38 Javadoc.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 10 Jan 2006 14:37:27 -0000 1.38 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 18 Jan 2006 14:01:07 -0000 >@@ -405,7 +405,7 @@ > // Scan all @param tags > for (int i = 0; i < paramTypeParamLength; i++) { > JavadocSingleTypeReference param = this.paramTypeParameters[i]; >- TypeBinding paramBindind = param.internalResolveType(scope); >+ TypeBinding paramBindind = param.internalResolveType(scope, TypeReference.CHECK_ALL); > if (paramBindind != null && paramBindind.isValidBinding()) { > if (paramBindind.isTypeVariable()) { > // Verify duplicated tags >Index: compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java,v >retrieving revision 1.53 >diff -u -r1.53 LocalDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java 10 Jan 2006 14:37:27 -0000 1.53 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java 18 Jan 2006 14:01:08 -0000 >@@ -145,7 +145,7 @@ > public void resolve(BlockScope scope) { > > // create a binding and add it to the scope >- TypeBinding variableType = type.resolveType(scope, true /* check bounds*/); >+ TypeBinding variableType = type.resolveType(scope, TypeReference.CHECK_ALL); > > checkModifiers(); > if (variableType != null) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java,v >retrieving revision 1.17 >diff -u -r1.17 JavadocSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java 18 Nov 2005 16:46:22 -0000 1.17 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java 18 Jan 2006 14:01:08 -0000 >@@ -30,7 +30,7 @@ > protected void reportInvalidType(Scope scope) { > scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers()); > } >- protected void reportDeprecatedType(Scope scope) { >+ public void reportDeprecatedType(Scope scope) { > scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers()); > } > >@@ -51,7 +51,7 @@ > /* > * We need to modify resolving behavior to handle package references > */ >- TypeBinding internalResolveType(Scope scope) { >+ TypeBinding internalResolveType(Scope scope, int checkMode) { > // handle the error here > this.constant = Constant.NotAConstant; > if (this.resolvedType != null)// is a shared type reference which was already resolved >@@ -75,8 +75,9 @@ > } > return null; > } >- if (isTypeUseDeprecated(this.resolvedType, scope)) >+ if ((checkMode & CHECK_NO_DEPRECATION) == 0 && isTypeUseDeprecated(this.resolvedType, scope)) { > reportDeprecatedType(scope); >+ } > if (resolvedType instanceof ParameterizedTypeBinding) { > resolvedType = ((ParameterizedTypeBinding)resolvedType).type; > } >@@ -87,11 +88,11 @@ > * @see org.eclipse.jdt.internal.compiler.ast.Expression#resolveType(org.eclipse.jdt.internal.compiler.lookup.BlockScope) > * We need to override to handle package references > */ >- public TypeBinding resolveType(BlockScope blockScope, boolean checkBounds) { >- return internalResolveType(blockScope); >+ public TypeBinding resolveType(BlockScope blockScope, int checkMode) { >+ return internalResolveType(blockScope, checkMode); > } > >- public TypeBinding resolveType(ClassScope classScope) { >- return internalResolveType(classScope); >+ public TypeBinding resolveType(ClassScope classScope, int checkMode) { >+ return internalResolveType(classScope, checkMode); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java,v >retrieving revision 1.45 >diff -u -r1.45 InstanceOfExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 10 Jan 2006 14:37:27 -0000 1.45 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 18 Jan 2006 14:01:06 -0000 >@@ -76,7 +76,7 @@ > > constant = Constant.NotAConstant; > TypeBinding expressionType = expression.resolveType(scope); >- TypeBinding checkedType = type.resolveType(scope, true /* check bounds*/); >+ TypeBinding checkedType = type.resolveType(scope, TypeReference.CHECK_ALL); > if (expressionType == null || checkedType == null) > return null; > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java,v >retrieving revision 1.35 >diff -u -r1.35 QualifiedThisReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java 5 Jan 2006 12:08:49 -0000 1.35 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java 18 Jan 2006 14:01:09 -0000 >@@ -75,7 +75,7 @@ > > constant = Constant.NotAConstant; > // X.this is not a param/raw type as denoting enclosing instance >- TypeBinding type = this.qualification.resolveType(scope, true /* check bounds*/); >+ TypeBinding type = this.qualification.resolveType(scope, TypeReference.CHECK_ALL); > if (type == null) return null; > // X.this is not a param/raw type as denoting enclosing instance > type = type.erasure(); >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java,v >retrieving revision 1.93 >diff -u -r1.93 CompilationUnitScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 10 Jan 2006 21:01:07 -0000 1.93 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 18 Jan 2006 14:01:11 -0000 >@@ -191,9 +191,9 @@ > System.arraycopy(resolvedImports, 0, resolvedImports = new ImportBinding[index], 0, index); > imports = resolvedImports; > } >-void checkParameterizedTypeBounds() { >+void performDeferredTypeChecks() { > for (int i = 0, length = topLevelTypes.length; i < length; i++) >- topLevelTypes[i].scope.checkParameterizedTypeBounds(); >+ topLevelTypes[i].scope.performDeferredTypeChecks(); > } > /* > * INTERNAL USE-ONLY >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java,v >retrieving revision 1.121 >diff -u -r1.121 SourceTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 12 Jan 2006 16:22:32 -0000 1.121 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 18 Jan 2006 14:01:15 -0000 >@@ -1107,7 +1107,7 @@ > TypeBinding fieldType = > fieldDecl.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT > ? initializationScope.environment().convertToRawType(this) // enum constant is implicitly of declaring enum type >- : fieldDecl.type.resolveType(initializationScope, true /* check bounds*/); >+ : fieldDecl.type.resolveType(initializationScope, TypeReference.CHECK_ALL); > field.type = fieldType; > field.modifiers &= ~ExtraCompilerModifiers.AccUnresolved; > if (fieldType == null) { >@@ -1156,7 +1156,7 @@ > methodDecl.scope.connectTypeVariables(typeParameters); > // Perform deferred bound checks for type variables (only done after type variable hierarchy is connected) > for (int i = 0, paramLength = typeParameters.length; i < paramLength; i++) >- typeParameters[i].checkBounds(methodDecl.scope); >+ typeParameters[i].performDeferredCheck(methodDecl.scope); > } > TypeReference[] exceptionTypes = methodDecl.thrownExceptions; > if (exceptionTypes != null) { >@@ -1166,7 +1166,7 @@ > int count = 0; > ReferenceBinding resolvedExceptionType; > for (int i = 0; i < size; i++) { >- resolvedExceptionType = (ReferenceBinding) exceptionTypes[i].resolveType(methodDecl.scope, true /* check bounds*/); >+ resolvedExceptionType = (ReferenceBinding) exceptionTypes[i].resolveType(methodDecl.scope, TypeReference.CHECK_ALL); > if (resolvedExceptionType == null) > continue; > if (resolvedExceptionType.isBoundParameterizedType()) { >@@ -1192,7 +1192,7 @@ > method.parameters = new TypeBinding[size]; > for (int i = 0; i < size; i++) { > Argument arg = arguments[i]; >- TypeBinding parameterType = arg.type.resolveType(methodDecl.scope, true /* check bounds*/); >+ TypeBinding parameterType = arg.type.resolveType(methodDecl.scope, TypeReference.CHECK_ALL); > if (parameterType == null) { > foundArgProblem = true; > } else if (parameterType == TypeBinding.VOID) { >@@ -1220,7 +1220,7 @@ > method.returnType = null; > foundReturnTypeProblem = true; > } else { >- TypeBinding methodType = returnType.resolveType(methodDecl.scope, true /* check bounds*/); >+ TypeBinding methodType = returnType.resolveType(methodDecl.scope, TypeReference.CHECK_ALL); > if (methodType == null) { > foundReturnTypeProblem = true; > } else if (methodType.isArrayType() && ((ArrayBinding) methodType).leafComponentType == TypeBinding.VOID) { >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java,v >retrieving revision 1.128 >diff -u -r1.128 ClassScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 10 Jan 2006 14:37:28 -0000 1.128 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 18 Jan 2006 14:01:10 -0000 >@@ -701,28 +701,35 @@ > } while ((currentType = currentType.superclass()) != null && (currentType.tagBits & TagBits.HasNoMemberTypes) == 0); > } > // Perform deferred bound checks for parameterized type references (only done after hierarchy is connected) >- public void checkParameterizedTypeBounds() { >+ public void performDeferredTypeChecks() { > TypeReference superclass = referenceContext.superclass; > if (superclass != null) { > superclass.checkBounds(this); >+ if (superclass.isTypeUseDeprecated(superclass.resolvedType, this)) { >+ superclass.reportDeprecatedType(this); >+ } > } > TypeReference[] superinterfaces = referenceContext.superInterfaces; > if (superinterfaces != null) { > for (int i = 0, length = superinterfaces.length; i < length; i++) { >- superinterfaces[i].checkBounds(this); >+ TypeReference superinterface = superinterfaces[i]; >+ superinterface.checkBounds(this); >+ if (superinterface.isTypeUseDeprecated(superinterface.resolvedType, this)) { >+ superinterface.reportDeprecatedType(this); >+ } > } > } > TypeParameter[] typeParameters = referenceContext.typeParameters; > if (typeParameters != null) { > for (int i = 0, paramLength = typeParameters.length; i < paramLength; i++) { >- typeParameters[i].checkBounds(this); >+ typeParameters[i].performDeferredCheck(this); > } > } > // propagate to member types > ReferenceBinding[] memberTypes = referenceContext.binding.memberTypes; > if (memberTypes != null && memberTypes != Binding.NO_MEMBER_TYPES) { > for (int i = 0, size = memberTypes.length; i < size; i++) >- ((SourceTypeBinding) memberTypes[i]).scope.checkParameterizedTypeBounds(); >+ ((SourceTypeBinding) memberTypes[i]).scope.performDeferredTypeChecks(); > } > } > >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java,v >retrieving revision 1.65 >diff -u -r1.65 LookupEnvironment.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 12 Jan 2006 16:22:32 -0000 1.65 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 18 Jan 2006 14:01:11 -0000 >@@ -182,7 +182,6 @@ > * case either the faulty import/superinterface/field/method will be skipped or a > * suitable replacement will be substituted (such as Object for a missing superclass) > */ >- > public void completeTypeBindings() { > stepCompleted = BUILD_TYPE_HIERARCHY; > >@@ -197,12 +196,14 @@ > stepCompleted = CONNECT_TYPE_HIERARCHY; > > for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) { >- CompilationUnitScope unitScope = (this.unitBeingCompleted = this.units[i]).scope; >- unitScope.checkParameterizedTypeBounds(); >- unitScope.buildFieldsAndMethods(); >- this.units[i] = null; // release unnecessary reference to the parsed unit >+ (this.unitBeingCompleted = this.units[i]).scope.buildFieldsAndMethods(); > } > stepCompleted = BUILD_FIELDS_AND_METHODS; >+ >+ for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) { >+ (this.unitBeingCompleted = this.units[i]).scope.performDeferredTypeChecks(); >+ this.units[i] = null; // release unnecessary reference to the parsed unit >+ } > this.lastCompletedUnitIndex = this.lastUnitIndex; > this.unitBeingCompleted = null; > } >@@ -249,9 +250,9 @@ > > (this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports(); > parsedUnit.scope.connectTypeHierarchy(); >- parsedUnit.scope.checkParameterizedTypeBounds(); > if (buildFieldsAndMethods) > parsedUnit.scope.buildFieldsAndMethods(); >+ parsedUnit.scope.performDeferredTypeChecks(); > this.unitBeingCompleted = null; > } > public TypeBinding computeBoxingType(TypeBinding type) { >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.254 >diff -u -r1.254 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 10 Jan 2006 21:01:07 -0000 1.254 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 18 Jan 2006 14:01:14 -0000 >@@ -471,8 +471,8 @@ > if (typeRef == null) > continue nextVariable; > TypeBinding superType = this.kind == METHOD_SCOPE >- ? typeRef.resolveType((BlockScope)this, false/*no bound check*/) >- : typeRef.resolveType((ClassScope)this); >+ ? typeRef.resolveType((BlockScope)this, TypeReference.CHECK_NO_BOUND|TypeReference.CHECK_NO_DEPRECATION) >+ : typeRef.resolveType((ClassScope)this, TypeReference.CHECK_NO_BOUND|TypeReference.CHECK_NO_DEPRECATION); > if (superType == null) { > typeVariable.tagBits |= TagBits.HierarchyHasProblems; > noProblems = false; >@@ -507,8 +507,8 @@ > for (int j = 0, boundLength = boundRefs.length; j < boundLength; j++) { > typeRef = boundRefs[j]; > superType = this.kind == METHOD_SCOPE >- ? typeRef.resolveType((BlockScope)this, false) >- : typeRef.resolveType((ClassScope)this); >+ ? typeRef.resolveType((BlockScope)this, TypeReference.CHECK_NO_BOUND) >+ : typeRef.resolveType((ClassScope)this, TypeReference.CHECK_NO_BOUND); > if (superType == null) { > typeVariable.tagBits |= TagBits.HierarchyHasProblems; > noProblems = false; >Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java,v >retrieving revision 1.48 >diff -u -r1.48 CodeSnippetMessageSend.java >--- eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java 13 Jan 2006 16:37:16 -0000 1.48 >+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java 18 Jan 2006 14:01:16 -0000 >@@ -15,6 +15,7 @@ > import org.eclipse.jdt.internal.compiler.ast.Expression; > import org.eclipse.jdt.internal.compiler.ast.MessageSend; > import org.eclipse.jdt.internal.compiler.ast.NameReference; >+import org.eclipse.jdt.internal.compiler.ast.TypeReference; > import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.jdt.internal.compiler.codegen.CodeStream; > import org.eclipse.jdt.internal.compiler.flow.FlowInfo; >@@ -218,7 +219,7 @@ > boolean argHasError = false; // typeChecks all arguments > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { >+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, TypeReference.CHECK_ALL)) == null) { > argHasError = true; > } > } >Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java,v >retrieving revision 1.33 >diff -u -r1.33 CodeSnippetAllocationExpression.java >--- eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java 13 Jan 2006 16:37:16 -0000 1.33 >+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java 18 Jan 2006 14:01:15 -0000 >@@ -13,6 +13,7 @@ > import org.eclipse.jdt.internal.compiler.ast.AllocationExpression; > import org.eclipse.jdt.internal.compiler.ast.CastExpression; > import org.eclipse.jdt.internal.compiler.ast.Expression; >+import org.eclipse.jdt.internal.compiler.ast.TypeReference; > import org.eclipse.jdt.internal.compiler.codegen.CodeStream; > import org.eclipse.jdt.internal.compiler.flow.FlowInfo; > import org.eclipse.jdt.internal.compiler.impl.Constant; >@@ -123,7 +124,7 @@ > public TypeBinding resolveType(BlockScope scope) { > // Propagate the type checking to the arguments, and check if the constructor is defined. > this.constant = Constant.NotAConstant; >- this.resolvedType = this.type.resolveType(scope, true /* check bounds*/); // will check for null after args are resolved >+ this.resolvedType = this.type.resolveType(scope, TypeReference.CHECK_ALL); // will check for null after args are resolved > > // buffering the arguments' types > boolean argsContainCast = false; >Index: codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java,v >retrieving revision 1.2 >diff -u -r1.2 SelectionOnParameterizedSingleTypeReference.java >--- codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java 23 Feb 2005 02:47:30 -0000 1.2 >+++ codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java 18 Jan 2006 14:01:06 -0000 >@@ -21,13 +21,13 @@ > super(name, typeArguments, 0, pos); > } > >- public TypeBinding resolveType(BlockScope scope, boolean checkBounds) { >- super.resolveType(scope, checkBounds); >+ public TypeBinding resolveType(BlockScope scope, int mode) { >+ super.resolveType(scope, mode); > throw new SelectionNodeFound(this.resolvedType); > } > >- public TypeBinding resolveType(ClassScope scope) { >- super.resolveType(scope); >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { >+ super.resolveType(scope, checkMode); > throw new SelectionNodeFound(this.resolvedType); > } > >Index: codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java,v >retrieving revision 1.8 >diff -u -r1.8 SelectionOnParameterizedQualifiedTypeReference.java >--- codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java 28 Jul 2005 16:33:24 -0000 1.8 >+++ codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java 18 Jan 2006 14:01:06 -0000 >@@ -29,8 +29,8 @@ > this.typeArguments[length] = assistTypeArguments; > } > >- public TypeBinding resolveType(BlockScope scope, boolean checkBounds) { >- super.resolveType(scope, checkBounds); >+ public TypeBinding resolveType(BlockScope scope, int mode) { >+ super.resolveType(scope, mode); > //// removed unnecessary code to solve bug 94653 > //if(this.resolvedType != null && this.resolvedType.isRawType()) { > // ParameterizedTypeBinding parameterizedTypeBinding = scope.createParameterizedType(((RawTypeBinding)this.resolvedType).type, new TypeBinding[0], this.resolvedType.enclosingType()); >@@ -39,8 +39,8 @@ > throw new SelectionNodeFound(this.resolvedType); > } > >- public TypeBinding resolveType(ClassScope scope) { >- super.resolveType(scope); >+ public TypeBinding resolveType(ClassScope scope, int checkMode) { >+ super.resolveType(scope, checkMode); > //// removed unnecessary code to solve bug 94653 > //if(this.resolvedType != null && this.resolvedType.isRawType()) { > // ParameterizedTypeBinding parameterizedTypeBinding = scope.createParameterizedType(((RawTypeBinding)this.resolvedType).type, new TypeBinding[0], this.resolvedType.enclosingType());
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
Actions:
View
|
Diff
Attachments on
bug 124119
:
33207
|
33213