-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
hs25
Apache reported the following regression issue with jdk 8 ea b111:
Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class TestCloneInterface
at TestCloneInterface.test(TestCloneInterface.java:15)
at TestCloneInterface.main(TestCloneInterface.java:19)
The testcase TestCloneInterface.java is attached. Testcase appear to pass with jdk 8 ea b109 (and b110).
Below is email from Apache:
----------------------------------------------------------------------------------------------------
Hi,
I was able to reproduce with a simple test case that emulates the UIMA code.
See attached test case, just compile it with any JDK and run with b111:
With Java 7 or JDK8b109:
> javac TestCloneInterface.java
> java TestCloneInterface
>
With JDK8b111:
> java TestCloneInterface
Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class TestCloneInterface
at TestCloneInterface.test(TestCloneInterface.java:15)
at TestCloneInterface.main(TestCloneInterface.java:19)
>
The bug happens if the clone() method is declared in a superinterface only. Without the additional interface inbetween, test passes.
Instead of the real interface (the "o" local variable, which is of type "FoobarIntf") it checks access flags on "this", which is of type "TestCloneInterface".
Uwe
-----
Uwe Schindler
uschindler@apache.org
Apache Lucene PMC Chair / Committer
Bremen, Germany
http://lucene.apache.org/
-----------------------------------------------------------------------------------------------------------------
Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class TestCloneInterface
at TestCloneInterface.test(TestCloneInterface.java:15)
at TestCloneInterface.main(TestCloneInterface.java:19)
The testcase TestCloneInterface.java is attached. Testcase appear to pass with jdk 8 ea b109 (and b110).
Below is email from Apache:
----------------------------------------------------------------------------------------------------
Hi,
I was able to reproduce with a simple test case that emulates the UIMA code.
See attached test case, just compile it with any JDK and run with b111:
With Java 7 or JDK8b109:
> javac TestCloneInterface.java
> java TestCloneInterface
>
With JDK8b111:
> java TestCloneInterface
Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class TestCloneInterface
at TestCloneInterface.test(TestCloneInterface.java:15)
at TestCloneInterface.main(TestCloneInterface.java:19)
>
The bug happens if the clone() method is declared in a superinterface only. Without the additional interface inbetween, test passes.
Instead of the real interface (the "o" local variable, which is of type "FoobarIntf") it checks access flags on "this", which is of type "TestCloneInterface".
Uwe
-----
Uwe Schindler
uschindler@apache.org
Apache Lucene PMC Chair / Committer
Bremen, Germany
http://lucene.apache.org/
-----------------------------------------------------------------------------------------------------------------
- duplicates
-
JDK-8026394 Eclipse fails with JDK8 build 111
-
- Closed
-