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 55775 Details for
Bug 168088
SourceTypeConverter NPE in log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Better patch
patch_168088.txt (text/plain), 2.87 KB, created by
Olivier Thomann
on 2006-12-15 14:24:55 EST
(
hide
)
Description:
Better patch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-12-15 14:24:55 EST
Size:
2.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java,v >retrieving revision 1.52 >diff -u -r1.52 SourceTypeConverter.java >--- model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 15 Dec 2006 19:18:31 -0000 1.52 >+++ model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 15 Dec 2006 19:22:22 -0000 >@@ -335,9 +335,14 @@ > if ((this.flags & FIELD_INITIALIZATION) != 0) { > if (hasDefaultValue) { > char[] defaultValueSource = CharOperation.subarray(getSource(), annotationMethodInfo.defaultValueStart, annotationMethodInfo.defaultValueEnd+1); >- Expression expression = parseMemberValue(defaultValueSource); >- if (expression != null) { >- annotationMethodDeclaration.defaultValue = expression; >+ if (defaultValueSource != null) { >+ Expression expression = parseMemberValue(defaultValueSource); >+ if (expression != null) { >+ annotationMethodDeclaration.defaultValue = expression; >+ } >+ } else { >+ // could not retrieve the default value >+ hasDefaultValue = false; > } > } > } >@@ -598,15 +603,17 @@ > int start = (int) (position >>> 32); > int end = (int) position; > char[] annotationSource = CharOperation.subarray(cuSource, start, end+1); >- Expression expression = parseMemberValue(annotationSource); >- /* >- * expression can be null or not an annotation if the source has changed between >- * the moment where the annotation source positions have been retrieved and the moment were >- * this parsing occured. >- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=90916 >- */ >- if (expression instanceof Annotation) { >- annotations[recordedAnnotations++] = (Annotation) expression; >+ if (annotationSource != null) { >+ Expression expression = parseMemberValue(annotationSource); >+ /* >+ * expression can be null or not an annotation if the source has changed between >+ * the moment where the annotation source positions have been retrieved and the moment were >+ * this parsing occured. >+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=90916 >+ */ >+ if (expression instanceof Annotation) { >+ annotations[recordedAnnotations++] = (Annotation) expression; >+ } > } > } > if (length != recordedAnnotations) { >@@ -1124,9 +1131,7 @@ > } > > private Expression parseMemberValue(char[] memberValue) { >- if (memberValue == null) { >- return null; >- } >+ // memberValue must not be null > if (this.parser == null) { > this.parser = new Parser(this.problemReporter, true); > }
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 168088
:
55774
| 55775