- 
    Bug 
- 
    Resolution: Fixed
- 
     P1 P1
- 
    hs25, 8
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8027493 | 8 | Harold Seigel | P1 | Closed | Fixed | b114 | 
                    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)
            
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)
- backported by
- 
                    JDK-8027493 Eclipse fails with JDK8 build 111 -           
- Closed
 
-         
- duplicates
- 
                    JDK-8026845 Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object -           
- Closed
 
-         
- relates to
- 
                    JDK-8028741 Interface Method Resolution should skip static and non-public methods in j.l.Object -           
- Closed
 
-         
- 
                    JDK-8154587 Resolution fails for default method named 'clone' -           
- Resolved
 
-