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 81059 Details for
Bug 193210
[1.5][compiler] Internal compiler error java.lang.NullPointerException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
193210a.txt (text/plain), 3.40 KB, created by
Philipe Mulet
on 2007-10-24 09:44:56 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2007-10-24 09:44:56 EDT
Size:
3.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >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.153 >diff -u -r1.153 ClassScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 12 Oct 2007 17:33:41 -0000 1.153 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 24 Oct 2007 13:42:08 -0000 >@@ -54,8 +54,9 @@ > } > > private void buildFields() { >+ SourceTypeBinding sourceType = referenceContext.binding; > if (referenceContext.fields == null) { >- referenceContext.binding.setFields(Binding.NO_FIELDS); >+ sourceType.setFields(Binding.NO_FIELDS); > return; > } > // count the number of fields vs. initializers >@@ -78,10 +79,10 @@ > for (int i = 0; i < size; i++) { > FieldDeclaration field = fields[i]; > if (field.getKind() == AbstractVariableDeclaration.INITIALIZER) { >- if (referenceContext.binding.isInterface()) >- problemReporter().interfaceCannotHaveInitializers(referenceContext.binding, field); >+ if (sourceType.isInterface()) >+ problemReporter().interfaceCannotHaveInitializers(sourceType, field); > } else { >- FieldBinding fieldBinding = new FieldBinding(field, null, field.modifiers | ExtraCompilerModifiers.AccUnresolved, referenceContext.binding); >+ FieldBinding fieldBinding = new FieldBinding(field, null, field.modifiers | ExtraCompilerModifiers.AccUnresolved, sourceType); > fieldBinding.id = count; > // field's type will be resolved when needed for top level types > checkAndSetModifiersForField(fieldBinding, field); >@@ -93,14 +94,14 @@ > for (int f = 0; f < i; f++) { > FieldDeclaration previousField = fields[f]; > if (previousField.binding == previousBinding) { >- problemReporter().duplicateFieldInType(referenceContext.binding, previousField); >+ problemReporter().duplicateFieldInType(sourceType, previousField); > previousField.binding = null; > break; > } > } > } > knownFieldNames.put(field.name, null); // ensure that the duplicate field is found & removed >- problemReporter().duplicateFieldInType(referenceContext.binding, field); >+ problemReporter().duplicateFieldInType(sourceType, field); > field.binding = null; > } else { > knownFieldNames.put(field.name, fieldBinding); >@@ -126,7 +127,8 @@ > } > if (count != fieldBindings.length) > System.arraycopy(fieldBindings, 0, fieldBindings = new FieldBinding[count], 0, count); >- referenceContext.binding.setFields(fieldBindings); >+ sourceType.tagBits &= ~(TagBits.AreFieldsSorted|TagBits.AreFieldsComplete); // in case some static imports reached already into this type >+ sourceType.setFields(fieldBindings); > } > > void buildFieldsAndMethods() { >@@ -290,7 +292,7 @@ > } > if (count != methodBindings.length) > System.arraycopy(methodBindings, 0, methodBindings = new MethodBinding[count], 0, count); >- sourceType.tagBits &= ~TagBits.AreMethodsSorted; // in case some static imports reached already into this type >+ sourceType.tagBits &= ~(TagBits.AreMethodsSorted|TagBits.AreMethodsComplete); // in case some static imports reached already into this type > sourceType.setMethods(methodBindings); > } >
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 193210
:
71799
| 81059