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 145638 Details for
Bug 287009
Inner Annotation Checks are Missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression test
patchInnerAnnot.txt (text/plain), 2.36 KB, created by
Ayushman Jain
on 2009-08-26 05:03:12 EDT
(
hide
)
Description:
Proposed fix + regression test
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2009-08-26 05:03:12 EDT
Size:
2.36 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v >retrieving revision 1.199 >diff -u -r1.199 AnnotationTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 17 Aug 2009 17:46:05 -0000 1.199 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 26 Aug 2009 08:16:18 -0000 >@@ -8850,4 +8850,23 @@ > null, null, > JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); > } >+ >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=287009 >+public void test270() { >+ this.runNegativeTest( >+ new String[] { >+ "Test.java", >+ "public class Test<T> {\n" + >+ " @interface Anno {\n" + >+ " Anno value();\n" + >+ " }\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in Test.java (at line 3)\n" + >+ " Anno value();\n" + >+ " ^^^^\n" + >+ "Cycle detected: the annotation type Test<T>.Anno cannot contain attributes of the annotation type itself\n" + >+ "----------\n"); >+} > } >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java,v >retrieving revision 1.135 >diff -u -r1.135 ReferenceBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 19 Jun 2009 18:47:04 -0000 1.135 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 26 Aug 2009 08:16:23 -0000 >@@ -670,7 +670,7 @@ > boolean inCycle = false; // check each method before failing > for (int i = 0, l = currentMethods.length; i < l; i++) { > TypeBinding returnType = currentMethods[i].returnType.leafComponentType(); >- if (this == returnType) { >+ if (this == returnType || this == returnType.erasure()) { > if (this instanceof SourceTypeBinding) { > MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod(); > ((SourceTypeBinding) this).scope.problemReporter().annotationCircularity(this, this, decl != null ? decl.returnType : null);
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 287009
:
145638
|
145767