8130669: VM prohibits <clinit> methods with return values

Ignore <clinit> methods with return values instead of throwing ClassFormatError exceptions

Reviewed-by: acorn, iklam
This commit is contained in:
Harold Seigel 2015-07-09 15:39:05 -04:00
parent 00da567d15
commit 9d7677a83f
5 changed files with 143 additions and 3 deletions

View file

@ -2846,7 +2846,7 @@ void ClassVerifier::verify_invoke_instructions(
if (sig_stream.type() != T_VOID) {
if (method_name == vmSymbols::object_initializer_name()) {
// <init> method must have a void return type
/* Unreachable? Class file parser verifies that methods with '<' have
/* Unreachable? Class file parser verifies that <init> methods have
* void return */
verify_error(ErrorContext::bad_code(bci),
"Return type must be void in <init> method");