Bug 235871 - ClassCastException: com.sun.tools.javac.code.Attribute$Error cannot be cast to com.sun.tools.javac.code.Attribute$Class
ClassCastException: com.sun.tools.javac.code.Attribute$Error cannot be cast t...
Status: NEW
Product: java
Classification: Unclassified
Component: Compiler
7.4
All All
: P3 (vote)
: TBD
Assigned To: Dusan Balek
issues@java
EXCEPTIONS_REPORT
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 11:45 UTC by Jan Lahoda
Modified: 2014-03-14 15:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (1.85 KB, text/plain)
2013-09-12 11:45 UTC, Jan Lahoda
Details
stacktrace (2.96 KB, text/plain)
2014-02-07 10:40 UTC, Jiri Prox
Details
stacktrace (1.91 KB, text/plain)
2014-03-14 15:52 UTC, skygo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2013-09-12 11:45:12 UTC
Build: NetBeans IDE Dev (Build 20130828-814a27f8b811)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_11-b21
OS: Linux

User Comments:
jlahoda: R.java in the default package:
package use;

import java.lang.annotation.Repeatable;

@RA(E.A)
@RA(E.B)
public class R {

}

enum E {
    A, B;
}

@Repeatable(RAC.class)
@interface RA {
    E value();
}


@interface RAC {
    RA[] value();
}




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Attribute$Error cannot be cast to com.sun.tools.javac.code.Attribute$Class
   at com.sun.tools.javac.comp.Check.validateRepeatable(Check.java:2750)
   at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4437)
   at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4378)
   at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4312)
   at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4286)
   at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1288)
Comment 1 Jan Lahoda 2013-09-12 11:45:14 UTC
Created attachment 139979 [details]
stacktrace
Comment 2 Jan Lahoda 2013-09-12 11:48:15 UTC
And I had another copy of the file in the "use" package - first happened to me when I was tried to move the file from the use package into the default package.
Comment 3 Jiri Prox 2014-02-07 10:40:30 UTC
Created attachment 144902 [details]
stacktrace

Using code completion
Comment 4 skygo 2014-03-14 15:52:20 UTC
Created attachment 146028 [details]
stacktrace

Editing annotation @interface that use 
@Repeatable


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo