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 123762 Details for
Bug 262304
[1.5][compiler] Enum constant in annotation value: javac vs Eclipse differ
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Complement
patch_262304.txt (text/plain), 2.68 KB, created by
Olivier Thomann
on 2009-01-26 11:31:35 EST
(
hide
)
Description:
Complement
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-01-26 11:31:35 EST
Size:
2.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java,v >retrieving revision 1.58 >diff -u -r1.58 ConstantPool.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java 17 Sep 2008 09:08:39 -0000 1.58 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java 26 Jan 2009 16:30:11 -0000 >@@ -999,4 +999,11 @@ > this.currentIndex = 1; > this.currentOffset = 0; > } >+public void resetForAttributeName(char[] attributeName, int constantPoolIndex, int constantPoolOffset) { >+ this.currentIndex = constantPoolIndex; >+ this.currentOffset = constantPoolOffset; >+ if (this.UTF8Cache.get(attributeName) >= constantPoolIndex) { >+ this.UTF8Cache.remove(attributeName); >+ } >+} > } >Index: compiler/org/eclipse/jdt/internal/compiler/ClassFile.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java,v >retrieving revision 1.183 >diff -u -r1.183 ClassFile.java >--- compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 20 Nov 2008 16:32:30 -0000 1.183 >+++ compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 26 Jan 2009 16:30:11 -0000 >@@ -6507,6 +6507,8 @@ > } > > int annotationAttributeOffset = this.contentsOffset; >+ int constantPOffset = this.constantPool.currentOffset; >+ int constantPoolIndex = this.constantPool.currentIndex; > if (invisibleAnnotationsCounter != 0) { > if (this.contentsOffset + 10 >= this.contents.length) { > resizeContents(10); >@@ -6546,10 +6548,14 @@ > attributesNumber++; > } else { > this.contentsOffset = annotationAttributeOffset; >+ // reset the constant pool to its state before the clinit >+ this.constantPool.resetForAttributeName(AttributeNamesConstants.RuntimeInvisibleAnnotationsName, constantPoolIndex, constantPOffset); > } > } > > annotationAttributeOffset = this.contentsOffset; >+ constantPOffset = this.constantPool.currentOffset; >+ constantPoolIndex = this.constantPool.currentIndex; > if (visibleAnnotationsCounter != 0) { > if (this.contentsOffset + 10 >= this.contents.length) { > resizeContents(10); >@@ -6589,6 +6595,7 @@ > attributesNumber++; > } else { > this.contentsOffset = annotationAttributeOffset; >+ this.constantPool.resetForAttributeName(AttributeNamesConstants.RuntimeVisibleAnnotationsName, constantPoolIndex, constantPOffset); > } > } > return attributesNumber;
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 262304
:
123732
| 123762