Details
-
Bug
-
Resolution: Fixed
-
P2
-
1.8, hs25, 8
Description
ClassFormatError is produced during runtime for the following code:
interface SAM {
void m();
}
class MyTester {
public void ifoo() { }
}
public class lmbd02206m1 {
public static void main(String argv[]) {
MyTester t = new MyTester() {
SAM s = super::ifoo;
};
}
}
Exception in thread "main" java.lang.ClassFormatError: Method "lambda" in class javasoft/sqe/tests/lang/lmbd022/lmbd02206m1/lmbd02206m1$1 has illegal signature "(([Ljava/lang/String;)V)Ljavasoft/sqe/tests/lang/lmbd022/lmbd02206m1/SAM;"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at javasoft.sqe.tests.lang.lmbd022.lmbd02206m1.lmbd02206m1.main(lmbd02206m1.java:20)
The following JCK test fails:
lang/LMBD/lmbd022/lmbd02206m1/lmbd02206m1.html
And here is the aurora RULE for the failure:
RULE lang/LMBD/lmbd022/lmbd02206m1/lmbd02206m1.html
Exception thrown from "run" method: java.lang.ClassFormatError: Method "lambda" in class javasoft/sqe/tests/lang/lmbd022/lmbd02206m1/lmbd02206m1$1 has illegal signature "(([Ljava/lang/String;Ljava/io/PrintStream;)I)Ljavasoft/sqe/tests/lang/lmbd022/lmbd02206m1/SAM;"
interface SAM {
void m();
}
class MyTester {
public void ifoo() { }
}
public class lmbd02206m1 {
public static void main(String argv[]) {
MyTester t = new MyTester() {
SAM s = super::ifoo;
};
}
}
Exception in thread "main" java.lang.ClassFormatError: Method "lambda" in class javasoft/sqe/tests/lang/lmbd022/lmbd02206m1/lmbd02206m1$1 has illegal signature "(([Ljava/lang/String;)V)Ljavasoft/sqe/tests/lang/lmbd022/lmbd02206m1/SAM;"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at javasoft.sqe.tests.lang.lmbd022.lmbd02206m1.lmbd02206m1.main(lmbd02206m1.java:20)
The following JCK test fails:
lang/LMBD/lmbd022/lmbd02206m1/lmbd02206m1.html
And here is the aurora RULE for the failure:
RULE lang/LMBD/lmbd022/lmbd02206m1/lmbd02206m1.html
Exception thrown from "run" method: java.lang.ClassFormatError: Method "lambda" in class javasoft/sqe/tests/lang/lmbd022/lmbd02206m1/lmbd02206m1$1 has illegal signature "(([Ljava/lang/String;Ljava/io/PrintStream;)I)Ljavasoft/sqe/tests/lang/lmbd022/lmbd02206m1/SAM;"
Attachments
Issue Links
- relates to
-
JDK-8008801 super method reference and anonymous class
- Closed