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 42000 Details for
Bug 142653
[1.5][compiler] JDT Internal Compiler Error: NullPointerException in MethodVerifier.computeInheritedMethods(), Eclipe 3.2RC4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
142653.txt (text/plain), 5.84 KB, created by
Philipe Mulet
on 2006-05-19 06:58:26 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2006-05-19 06:58:26 EDT
Size:
5.84 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >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.100 >diff -u -r1.100 CompilationUnitScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 14 Apr 2006 08:34:05 -0000 1.100 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 19 May 2006 10:59:12 -0000 >@@ -202,7 +202,6 @@ > for (int i = 0, length = topLevelTypes.length; i < length; i++) { > ClassScope scope = topLevelTypes[i].scope; > scope.checkParameterizedTypeBounds(); >- scope.checkParameterizedSuperTypeCollisions(); > } > } > /* >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.136 >diff -u -r1.136 ClassScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 28 Apr 2006 14:53:28 -0000 1.136 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 19 May 2006 10:59:11 -0000 >@@ -621,40 +621,50 @@ > fieldBinding.modifiers = modifiers; > } > >- public void checkParameterizedSuperTypeCollisions() { >+ /** >+ * Check for super type collisions (both superinterfaces and type variables). >+ * @return the list of non-colliding superinterfaces >+ */ >+ public ReferenceBinding[] computeNonCollidingSuperInterfaces() { > // check for parameterized interface collisions (when different parameterizations occur) > SourceTypeBinding sourceType = referenceContext.binding; >- ReferenceBinding[] interfaces = sourceType.superInterfaces; >- int count = interfaces.length; >+ ReferenceBinding[] nonCollidingSuperInterfaces = sourceType.superInterfaces; // lazy allocation of clone if problem is discovered >+ int count = nonCollidingSuperInterfaces.length; > Map invocations = new HashMap(2); > ReferenceBinding itsSuperclass = sourceType.isInterface() ? null : sourceType.superclass; > nextInterface: for (int i = 0, length = count; i < length; i++) { >- ReferenceBinding one = interfaces[i]; >+ ReferenceBinding one = nonCollidingSuperInterfaces[i]; > if (one == null) continue nextInterface; > if (itsSuperclass != null && hasErasedCandidatesCollisions(itsSuperclass, one, invocations, sourceType, referenceContext)) { >- interfaces[i] = null; >+ if (nonCollidingSuperInterfaces == sourceType.superInterfaces) { // lazy cloning >+ System.arraycopy(sourceType.superInterfaces, 0, nonCollidingSuperInterfaces = new ReferenceBinding[count], 0, count); >+ } >+ nonCollidingSuperInterfaces[i] = null; > count--; > continue nextInterface; > } > nextOtherInterface: for (int j = 0; j < i; j++) { >- ReferenceBinding two = interfaces[j]; >+ ReferenceBinding two = nonCollidingSuperInterfaces[j]; > if (two == null) continue nextOtherInterface; > if (hasErasedCandidatesCollisions(one, two, invocations, sourceType, referenceContext)) { >- interfaces[i] = null; >+ if (nonCollidingSuperInterfaces == sourceType.superInterfaces) { // lazy cloning >+ System.arraycopy(sourceType.superInterfaces, 0, nonCollidingSuperInterfaces = new ReferenceBinding[count], 0, count); >+ } >+ nonCollidingSuperInterfaces[i] = null; > count--; > continue nextInterface; > } > } > } >- if (count < interfaces.length) { >+ if (count < nonCollidingSuperInterfaces.length) { > if (count == 0) { >- sourceType.superInterfaces = Binding.NO_SUPERINTERFACES; >+ nonCollidingSuperInterfaces = Binding.NO_SUPERINTERFACES; > } else { > ReferenceBinding[] newInterfaceBindings = new ReferenceBinding[count]; >- for (int i = 0, j = 0, l = interfaces.length; i < l; i++) >- if (interfaces[i] != null) >- newInterfaceBindings[j++] = interfaces[i]; >- sourceType.superInterfaces = newInterfaceBindings; >+ for (int i = 0, j = 0, l = nonCollidingSuperInterfaces.length; i < l; i++) >+ if (nonCollidingSuperInterfaces[i] != null) >+ newInterfaceBindings[j++] = nonCollidingSuperInterfaces[i]; >+ nonCollidingSuperInterfaces = newInterfaceBindings; > } > } > >@@ -683,11 +693,7 @@ > } > } > } >- >- 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.checkParameterizedSuperTypeCollisions(); >+ return nonCollidingSuperInterfaces; > } > > private void checkForInheritedMemberTypes(SourceTypeBinding sourceType) { >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java,v >retrieving revision 1.78 >diff -u -r1.78 MethodVerifier.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java 2 May 2006 19:46:54 -0000 1.78 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java 19 May 2006 10:59:12 -0000 >@@ -389,7 +389,8 @@ > ReferenceBinding superclass = this.type.isInterface() > ? this.type.scope.getJavaLangObject() // check interface methods against Object > : this.type.superclass(); // class or enum >- computeInheritedMethods(superclass, type.superInterfaces()); >+ ReferenceBinding[] interfaces = this.type.scope.computeNonCollidingSuperInterfaces(); >+ computeInheritedMethods(superclass, interfaces); > } > /* > Binding creation is responsible for reporting:
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 142653
:
42000
|
42001
|
42060