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

C1 dumps incorrect class name in ClassCastException message

XMLWordPrintable

    • b03
    • generic
    • generic

        ## Symptom
        -----------------------------------------------------
        STDERR:
        java.lang.AssertionError: Bad type in synthetic cast
                at T8058199.test(T8058199.java:62)
                at T8058199.testMethod(T8058199.java:39)
                at T8058199.main(T8058199.java:69)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:567)
                at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
                at java.base/java.lang.Thread.run(Thread.java:830)
        Caused by: java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava/lang/String; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap')
                at T8058199.lambda$testMethod$0(T8058199.java:39)
                at T8058199.test(T8058199.java:58)
                ... 8 more
        -----------------------------------------------------

        ## Reproduce
        -----------------------------------------------------
        make test TEST="langtools/tools/javac/generics/inference/8058199/T8058199.java" CONF=release JTREG="VM_OPTIONS=-Xcomp -XX:TieredStopAtLevel=1"
        -----------------------------------------------------

        ## Reason
        In C1, the class name was dumped as "[Ljava/lang/String;" rather than "[Ljava.lang.String;".

              bsrbnd Bernard Blaser
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: