-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b20
-
x86
-
linux_ubuntu
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8008248 | 8 | Bharadwaj Yadavalli | P2 | Closed | Fixed | b82 |
A program invoking a static method on an interface is rejected with a java.lang.VerifyError.
% javac src/StaticMethodInInterface.java src/TestStaticIF.java
% java -classpath src TestStaticIF
Exception in thread "main" java.lang.VerifyError: Illegal type at constant pool entry 5 in class TestStaticIF
Exception Details:
Location:
TestStaticIF.main([Ljava/lang/String;)V @11: invokestatic
Reason:
Constant pool index 5 is invalid
Bytecode:
0000000: b200 0212 0304 bd00 0459 03b8 0005 53b6
0000010: 0006 57b1
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2467)
at java.lang.Class.getMethod0(Class.java:2708)
at java.lang.Class.getMethod(Class.java:1620)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:528)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:510)
% javac src/StaticMethodInInterface.java src/TestStaticIF.java
% java -classpath src TestStaticIF
Exception in thread "main" java.lang.VerifyError: Illegal type at constant pool entry 5 in class TestStaticIF
Exception Details:
Location:
TestStaticIF.main([Ljava/lang/String;)V @11: invokestatic
Reason:
Constant pool index 5 is invalid
Bytecode:
0000000: b200 0212 0304 bd00 0459 03b8 0005 53b6
0000010: 0006 57b1
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2467)
at java.lang.Class.getMethod0(Class.java:2708)
at java.lang.Class.getMethod(Class.java:1620)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:528)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:510)
- backported by
-
JDK-8008248 VerifyError for use of static method in interface
-
- Closed
-
- relates to
-
JDK-8008507 JCK tests on lambda fail with VerifyError: Bad local variable type
-
- Closed
-
There are no Sub-Tasks for this issue.