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 22952 Details for
Bug 99428
[1.5][compiler] enum classes created without final accessFlag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
This is the right patch
patch_99428.txt (text/plain), 3.03 KB, created by
Olivier Thomann
on 2005-06-13 14:19:06 EDT
(
hide
)
Description:
This is the right patch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-06-13 14:19:06 EDT
Size:
3.03 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v >retrieving revision 1.67 >diff -u -r1.67 QualifiedAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 1 Jun 2005 15:16:53 -0000 1.67 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 13 Jun 2005 18:19:04 -0000 >@@ -253,9 +253,14 @@ > } > if (receiverType == null) { > hasError = true; >- } else if (((ReferenceBinding) receiverType).isFinal() && this.anonymousType != null) { >- if (!receiverType.isEnum()) { >- scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType); >+ } else if (((ReferenceBinding) receiverType).isFinal()) { >+ if (this.anonymousType != null) { >+ if (!receiverType.isEnum()) { >+ scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType); >+ } >+ } else if (!receiverType.canBeInstantiated()) { >+ scope.problemReporter().cannotInstantiate(type, receiverType); >+ return this.resolvedType = receiverType; > } > hasError = true; > } >@@ -290,11 +295,11 @@ > if (hasError) return this.resolvedType = receiverType; > if (this.anonymousType == null) { > // qualified allocation with no anonymous type >- ReferenceBinding allocationType = (ReferenceBinding) receiverType; > if (!receiverType.canBeInstantiated()) { > scope.problemReporter().cannotInstantiate(type, receiverType); > return this.resolvedType = receiverType; > } >+ ReferenceBinding allocationType = (ReferenceBinding) receiverType; > if ((this.binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) { > if (isMethodUseDeprecated(binding, scope)) { > scope.problemReporter().deprecatedMethod(this.binding, this); >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java,v >retrieving revision 1.116 >diff -u -r1.116 ClassScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 8 Jun 2005 21:11:01 -0000 1.116 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 13 Jun 2005 18:19:04 -0000 >@@ -491,6 +491,7 @@ > modifiers |= AccAbstract; > } > } >+ modifiers |= AccFinal; > } else { > // detect abnormal cases for classes > if (isMemberType) { // includes member types defined inside local types >@@ -588,6 +589,9 @@ > > // set the modifiers > int implicitValue = AccPublic | AccStatic | AccFinal | AccEnum; >+ if (fieldDecl.initialization instanceof QualifiedAllocationExpression) { >+ declaringClass.modifiers &= ~AccFinal; >+ } > fieldBinding.modifiers|= implicitValue; > return; > }
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 99428
:
22842
|
22923
|
22952
|
22953
|
22954