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

Eclipse fails with JDK8 build 111

    XMLWordPrintable

Details

    • b111
    • 8
    • b56
    • Verified

    Backports

      Description

        Eclipse Version: Kepler Service Release 1
        Build id: 20130919-0819

        Can not execute the indexer with JDK8 build 111 due to a change in how java.lang.Object.clone() is treated.

        The Eclipse CDT framework has a structure that uses a two level interface structure to create a clone() method that does not throw CloneNotSupportedException. This approach seems to work in b110 but stops working in b111.

        I can reproduce the issue with this examle:

        public interface IClone extends Cloneable {
        Object clone();
        }

        public interface ICloneExtend extends IClone { }

        public class CloneTest implements ICloneExtend {

        public Object clone() {
        return null;
        }

        public static void tryIt(ICloneExtend o1) {
        Object o2 = o1.clone();
        System.out.println(o1 + " was cloned to " + o2);
        }

        public static void main(String[] args) {
        CloneTest o1 = new CloneTest();
        tryIt(o1);
        }

        }


        Here is the output:

        $ ~/java/jdk1.8.0_b110/bin/java -showversion CloneTest
        java version "1.8.0-ea"
        Java(TM) SE Runtime Environment (build 1.8.0-ea-b110)
        Java HotSpot(TM) 64-Bit Server VM (build 25.0-b52, mixed mode)

        CloneTest@135fbaa4 was cloned to null



        $ ~/java/jdk1.8.0_b111/bin/java -showversion CloneTest
        java version "1.8.0-ea"
        Java(TM) SE Runtime Environment (build 1.8.0-ea-b111)
        Java HotSpot(TM) 64-Bit Server VM (build 25.0-b53, mixed mode)

        Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class CloneTest
        at CloneTest.tryIt(CloneTest.java:8)
        at CloneTest.main(CloneTest.java:14)

        Attachments

          Issue Links

            Activity

              People

                lfoltan Lois Foltan
                brutisso Bengt Rutisson (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: