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 49656 Details for
Bug 156540
Compiler produces invalid bytecode for certain enum declarations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_156540.txt (text/plain), 1.81 KB, created by
Olivier Thomann
on 2006-09-07 15:53:52 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-09-07 15:53:52 EDT
Size:
1.81 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.138 >diff -u -r1.138 ClassScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 8 Jun 2006 13:08:56 -0000 1.138 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 7 Sep 2006 19:56:17 -0000 >@@ -475,15 +475,21 @@ > for (int i = 0; i < methodsLength && !definesAbstractMethod; i++) > definesAbstractMethod = methods[i].isAbstract(); > if (!definesAbstractMethod) break checkAbstractEnum; // all methods have bodies >+ boolean needAbstractBit = false; > for (int i = 0; i < fieldsLength; i++) { > FieldDeclaration fieldDecl = fields[i]; >- if (fieldDecl.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) >- if (!(fieldDecl.initialization instanceof QualifiedAllocationExpression)) >+ if (fieldDecl.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) { >+ if (!(fieldDecl.initialization instanceof QualifiedAllocationExpression)) { > break checkAbstractEnum; >+ } else { >+ needAbstractBit = true; >+ } >+ } > } > // tag this enum as abstract since an abstract method must be implemented AND all enum constants define an anonymous body > // as a result, each of its anonymous constants will see it as abstract and must implement each inherited abstract method >- modifiers |= ClassFileConstants.AccAbstract; >+ if (needAbstractBit) >+ modifiers |= ClassFileConstants.AccAbstract; > } > } > modifiers |= ClassFileConstants.AccFinal;
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 156540
: 49656