test case related to AssertionError (8009360)
Werner Dietl
wdietl at gmail.com
Mon Apr 8 15:05:54 PDT 2013
Steve,
thanks for the bug report - I'll look at it.
It would be great if you could send me test cases that I can add to
the type-annotations repository - then we can be sure when the bug is
fixed and that it doesn't come back.
I don't think I can mark anything as fixed - I don't think I have an
account for the bug tracker.
cu, WMD.
On Mon, Apr 8, 2013 at 11:32 AM, Steve Sides <steve.sides at oracle.com> wrote:
> Hi Werner,
> If you want to mark 8009360 as fixed(the AssertionError for duplicate
> annotation) - I see it compiles and runs with the anon/inner class test I
> have - you can, but it looks like another duplicate visit scenario for this
> test case. There's a separate bug for it (8011722) but it may not be visible
> yet.
>
> -steve
>
>
> On 4/8/2013 11:12 AM, Steve Sides wrote:
>>
>> This came in as a webbug, seems like chasing the AssertionError around...
>>
>> public class AnnotatedQualifiedThrows {
>> class InnerException extends Exception { }
>> void foo() throws @C AnnotatedQualifiedThrows. at C InnerException { }
>> }
>>
>> @Target(ElementType.TYPE_USE) @interface C { }
>>
>>
>> When compiled with jdk8 builds, it results in a NullPointerException, but
>> when compiled with latest type-annotations build it results in an
>> AssertionError:
>>
>> ---------- javac ----------
>> An exception has occurred in the compiler (1.8.0-ea). Please file a bug at
>> the Java Developer Connection (http://java.sun.com/webapps/bugreport) after
>> checking the Bug Parade for duplicates. Include your program and the
>> following diagnostic in your report. Thank you.
>> java.lang.AssertionError: Can't annotate already annotated type: ({} ::
>> AnnotatedQualifiedThrows.InnerException)
>> at com.sun.tools.javac.util.Assert.error(Assert.java:133)
>> at com.sun.tools.javac.util.Assert.check(Assert.java:94)
>> at com.sun.tools.javac.code.Type$AnnotatedType.<init>(Type.java:1582)
>> at com.sun.tools.javac.comp.Attr.visitAnnotatedType(Attr.java:3936)
>> at
>> com.sun.tools.javac.tree.JCTree$JCAnnotatedType.accept(JCTree.java:2353)
>> at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:601)
>> at com.sun.tools.javac.comp.Attr.attribType(Attr.java:639)
>> at com.sun.tools.javac.comp.Attr.attribType(Attr.java:632)
>> at
>> com.sun.tools.javac.comp.MemberEnter.signature(MemberEnter.java:389)
>> at
>> com.sun.tools.javac.comp.MemberEnter.visitMethodDef(MemberEnter.java:555)
>> at
>> com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:770)
>> at
>> com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:418)
>> at
>> com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:430)
>> at
>> com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:440)
>> at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1216)
>> at
>> com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1036)
>> at com.sun.tools.javac.code.Symbol.complete(Symbol.java:434)
>> at
>> com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:883)
>> at com.sun.tools.javac.comp.Enter.complete(Enter.java:495)
>> at com.sun.tools.javac.comp.Enter.main(Enter.java:473)
>> at
>> com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:990)
>> at
>> com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:865)
>> at com.sun.tools.javac.main.Main.compile(Main.java:519)
>> at com.sun.tools.javac.main.Main.compile(Main.java:376)
>> at com.sun.tools.javac.main.Main.compile(Main.java:365)
>> at com.sun.tools.javac.main.Main.compile(Main.java:356)
>> at com.sun.tools.javac.Main.compile(Main.java:77)
>> at com.sun.tools.javac.Main.main(Main.java:62)
>>
>> Output completed (1 sec consumed)
>
>
--
http://www.google.com/profiles/wdietl
More information about the type-annotations-dev
mailing list