mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
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:
parent
00da567d15
commit
9d7677a83f
5 changed files with 143 additions and 3 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue