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 34101 Details for
Bug 126332
AIOOBE in classfile reader while exporting project in which annotations have arrays field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch_126332.txt (text/plain), 3.71 KB, created by
Olivier Thomann
on 2006-02-03 13:35:24 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-02-03 13:35:24 EST
Size:
3.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v >retrieving revision 1.168 >diff -u -r1.168 IProblem.java >--- compiler/org/eclipse/jdt/core/compiler/IProblem.java 27 Jan 2006 11:30:15 -0000 1.168 >+++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 3 Feb 2006 17:23:43 -0000 >@@ -1076,6 +1076,8 @@ > int TypeMissingDeprecatedAnnotation = Internal + 630; > /** @since 3.1 */ > int UnhandledWarningToken = Internal + 631; >+ /** @since 3.2 */ >+ int AnnotationValueAsArrayMustBeArrayInitializer = Internal + 632; > > /** > * Corrupted binaries >Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v >retrieving revision 1.193 >diff -u -r1.193 messages.properties >--- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 24 Jan 2006 10:50:38 -0000 1.193 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 3 Feb 2006 17:23:44 -0000 >@@ -519,6 +519,7 @@ > 629 = The deprecated method {0}({1}) of type {2} should be annotated with @Deprecated > 630 = The deprecated type {0} should be annotated with @Deprecated > 631 = Unhandled warning token {0} >+632 = The array creation is unnecessary in an annotation value; only an array initializer is allowed > > ### CORRUPTED BINARIES > 700 = The class file {0} contains a signature ''{1}'' ill-formed at position {2} >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.285 >diff -u -r1.285 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 2 Feb 2006 16:43:54 -0000 1.285 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 3 Feb 2006 17:23:44 -0000 >@@ -203,7 +203,14 @@ > superInterfaceRef.sourceStart, > superInterfaceRef.sourceEnd); > } >- >+public void annotationValueAsArrayMustBeArrayInitializer(Expression value) { >+ this.handle( >+ IProblem.AnnotationValueAsArrayMustBeArrayInitializer, >+ NoArgument, >+ NoArgument, >+ value.sourceStart, >+ value.sourceEnd); >+} > public void annotationValueMustBeAnnotation(TypeBinding annotationType, char[] name, Expression value, TypeBinding expectedType) { > String str = new String(name); > this.handle( >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.15 >diff -u -r1.15 MemberValuePair.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java 10 Jan 2006 21:01:06 -0000 1.15 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java 3 Feb 2006 17:23:43 -0000 >@@ -77,6 +77,8 @@ > if ((initializer.resolveTypeExpecting(scope, this.binding.returnType)) != null) { > this.value.resolvedType = initializer.binding = (ArrayBinding) this.binding.returnType; > } >+ } else if (this.value instanceof ArrayAllocationExpression) { >+ scope.problemReporter().annotationValueAsArrayMustBeArrayInitializer(this.value); > } else { > this.value.resolveType(scope); > }
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 126332
:
34067
| 34101