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 45465 Details for
Bug 147875
[1.5][compiler] NPE when initializing annotations of a binary field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
147875.txt (text/plain), 2.06 KB, created by
Philipe Mulet
on 2006-06-28 10:08:42 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2006-06-28 10:08:42 EDT
Size:
2.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java,v >retrieving revision 1.96 >diff -u -r1.96 BinaryTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 9 Jun 2006 10:19:06 -0000 1.96 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 28 Jun 2006 14:10:24 -0000 >@@ -315,6 +315,7 @@ > boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5; > boolean isViewedAsDeprecated = isViewedAsDeprecated(); > boolean hasRestrictedAccess = hasRestrictedAccess(); >+ int firstAnnotatedFieldIndex = -1; > for (int i = 0; i < size; i++) { > IBinaryField binaryField = iFields[i]; > char[] fieldSignature = use15specifics ? binaryField.getGenericSignature() : null; >@@ -328,8 +329,11 @@ > binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, > this, > binaryField.getConstant()); >- if (this.environment.globalOptions.storeAnnotations) >- field.setAnnotations(createAnnotations(binaryField.getAnnotations(), this.environment)); >+ if (firstAnnotatedFieldIndex < 0 >+ && this.environment.globalOptions.storeAnnotations >+ && binaryField.getAnnotations() != null) { >+ firstAnnotatedFieldIndex = i; >+ } > field.id = i; // ordinal > if (use15specifics) > field.tagBits |= binaryField.getTagBits(); >@@ -341,6 +345,12 @@ > field.modifiers |= ExtraCompilerModifiers.AccGenericSignature; > this.fields[i] = field; > } >+ // second pass for reifying annotations, since may refer to fields being constructed (147875) >+ if (firstAnnotatedFieldIndex >= 0) { >+ for (int i = firstAnnotatedFieldIndex; i <size; i++) { >+ this.fields[i].setAnnotations(createAnnotations(iFields[i].getAnnotations(), this.environment)); >+ } >+ } > } > } > }
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 147875
: 45465