Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023548

ClassCastException: com.sun.tools.javac.code.Attribute$UnresolvedClass cannot be cast to com.sun.tools.javac.code.Attribute$Class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 7, 8
    • tools
    • None

      I tried to create another API with annotation and a processor that deals with not yet generated classes. But this time with an array - I am getting ClassCastException however.

      To reproduce, just take the test in http://hg.openjdk.java.net/jdk8/tl/langtools/rev/e811fb09a1dc and change the annotations to use arrays of Class<?>:

          @interface A {
              Class<?>[] a();
          }
          @interface B {
              Class<?>[] a();
          }
          @interface C {
              Class<?>[] a();
          }

      A ClassCastException is thrown rather than javax.lang.model.type.MirroredTypesException

            Unassigned Unassigned
            jtulach Jaroslav Tulach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: