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 22950 Details for
Bug 99282
[1.5][compiler] Enum / Switch method is not initialized in a thread safe way
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_99282.txt (text/plain), 2.05 KB, created by
Olivier Thomann
on 2005-06-13 13:58:47 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-06-13 13:58:47 EDT
Size:
2.05 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java,v >retrieving revision 1.108 >diff -u -r1.108 CodeStream.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 26 May 2005 21:02:13 -0000 1.108 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 13 Jun 2005 17:57:59 -0000 >@@ -2008,7 +2008,11 @@ > > this.getstatic(syntheticFieldBinding); > this.dup(); >- this.ifnonnull(nullLabel); >+ this.ifnull(nullLabel); >+ final int stackSizeForIf = this.stackDepth; >+ this.areturn(); >+ nullLabel.place(); >+ this.stackDepth = stackSizeForIf; > this.pop(); > ReferenceBinding enumBinding = (ReferenceBinding) methodBinding.targetEnumType; > char[] signature = "()".toCharArray(); //$NON-NLS-1$ >@@ -2017,7 +2021,7 @@ > this.invoke(OPC_invokestatic, 0, 1, enumBinding.constantPoolName(), TypeConstants.VALUES, signature); > this.arraylength(); > this.newarray(INT_ARRAY); >- this.putstatic(syntheticFieldBinding); >+ this.astore_0(); > final FieldBinding[] fields = enumBinding.fields(); > if (fields != null) { > for (int i = 0, max = fields.length; i < max; i++) { >@@ -2025,7 +2029,7 @@ > if ((fieldBinding.getAccessFlags() & IConstants.AccEnum) != 0) { > final Label endLabel = new Label(this); > final ExceptionLabel anyExceptionHandler = new ExceptionLabel(this, BaseTypes.LongBinding /* represents NoSuchFieldError*/); >- this.getstatic(syntheticFieldBinding); >+ this.aload_0(); > this.getstatic(fieldBinding); > this.invokeEnumOrdinal(enumBinding.constantPoolName()); > this.generateInlinedValue(fieldBinding.id); >@@ -2042,8 +2046,9 @@ > } > } > } >- this.getstatic(syntheticFieldBinding); >- nullLabel.place(); >+ this.aload_0(); >+ this.dup(); >+ this.putstatic(syntheticFieldBinding); > areturn(); > } > public void generateSyntheticBodyForFieldReadAccess(SyntheticMethodBinding accessBinding) {
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 99282
: 22950