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 57918 Details for
Bug 172189
[1.5][compiler] NPE in CompilationUnitProblemFinder.process with explicit wildcard invocation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New patch
patch_172189.txt (text/plain), 3.92 KB, created by
Olivier Thomann
on 2007-01-31 10:55:01 EST
(
hide
)
Description:
New patch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-01-31 10:55:01 EST
Size:
3.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v >retrieving revision 1.215 >diff -u -r1.215 messages.properties >--- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 23 Nov 2006 17:27:18 -0000 1.215 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 31 Jan 2007 15:51:41 -0000 >@@ -480,6 +480,7 @@ > 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 method {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} >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.337 >diff -u -r1.337 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 26 Jan 2007 12:18:41 -0000 1.337 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 31 Jan 2007 15:51:41 -0000 >@@ -3471,6 +3471,14 @@ > 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)}; >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.118 >diff -u -r1.118 MessageSend.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 7 Dec 2006 14:50:04 -0000 1.118 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 31 Jan 2007 15:51:41 -0000 >@@ -329,9 +329,13 @@ > 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) { >+ TypeReference typeReference = this.typeArguments[i]; >+ 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 null; >Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v >retrieving revision 1.185 >diff -u -r1.185 IProblem.java >--- compiler/org/eclipse/jdt/core/compiler/IProblem.java 23 Nov 2006 17:27:18 -0000 1.185 >+++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 31 Jan 2007 15:51:41 -0000 >@@ -1038,6 +1038,8 @@ > int TypeHidingTypeParameterFromType = TypeRelated + 576; > /** @since 3.3 */ > int TypeHidingTypeParameterFromMethod = TypeRelated + 577; >+ /** @since 3.3 */ >+ int InvalidUsageOfWildcard = Syntax + Internal + 578; > > /** > * Foreach
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 172189
:
57817
| 57918