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

Compile-time error in the case of ((Integer[] & Serializable)new Integer[1]).getClass()

XMLWordPrintable

    • b112
    • b117
    • Not verified

        The following tests started to fail in 112 after changes corresponding to JDK-8021339 resolving with following compile-time error:

        Error: java: cannot find symbol
          symbol: method getClass()

        while attempting to cast array to intersection of array and some interface and call getClass after casting

        Affected tests:
        lang/LMBD/lmbd118/lmbd11803m141/lmbd11803m141_rt.html
        lang/LMBD/lmbd118/lmbd11803m341/lmbd11803m341_rt.html
        lang/LMBD/lmbd118/lmbd11803m03/lmbd11803m03_rt.html
        lang/LMBD/lmbd118/lmbd11803m33/lmbd11803m33_rt.html
        lang/LMBD/lmbd118/lmbd11803m13/lmbd11803m13_rt.html

        Please find the attached a sample of a code reproducing above-mentioned behavior

          1. Test.java
            0.3 kB
            Olga Strizhenko

              emc Eric Mccorkle
              ostrizhe Olga Strizhenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: