JDK-8007736 : VerifyError for use of static method in interface
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_ubuntu
  • CPU: x86
  • Submitted: 2013-02-07
  • Updated: 2014-01-14
  • Resolved: 2013-02-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8008187 :  
Description
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)