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 55318 Details for
Bug 167217
[1.5][compiler] ClassCastException during annotation code generation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_167217.txt (text/plain), 1.71 KB, created by
Olivier Thomann
on 2006-12-08 11:24:42 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-12-08 11:24:42 EST
Size:
1.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java,v >retrieving revision 1.25 >diff -u -r1.25 MemberValuePair.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java 28 Oct 2006 04:11:27 -0000 1.25 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java 8 Dec 2006 16:22:32 -0000 >@@ -199,6 +199,19 @@ > if (leafType.isAnnotationType()) { > if (!valueType.leafComponentType().isAnnotationType()) { // check annotation type and also reject null literal > scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); >+ } else if (this.value instanceof ArrayInitializer) { >+ ArrayInitializer initializer = (ArrayInitializer) this.value; >+ final Expression[] expressions = initializer.expressions; >+ if (expressions != null) { >+ for (int i =0, max = expressions.length; i < max; i++) { >+ Expression currentExpression = expressions[i]; >+ if (currentExpression instanceof NullLiteral || !(currentExpression instanceof Annotation)) { >+ scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, currentExpression, leafType); >+ } >+ } >+ } >+ } else if (!(this.value instanceof Annotation)) { >+ scope.problemReporter().annotationValueMustBeAnnotation(this.binding.declaringClass, this.name, this.value, leafType); > } > break checkAnnotationMethodType; > }
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 167217
: 55318 |
55320