mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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
|
@ -5087,8 +5087,8 @@ int ClassFileParser::verify_legal_method_signature(Symbol* name, Symbol* signatu
|
|||
// The first non-signature thing better be a ')'
|
||||
if ((length > 0) && (*p++ == JVM_SIGNATURE_ENDFUNC)) {
|
||||
length--;
|
||||
if (name->utf8_length() > 0 && name->byte_at(0) == '<') {
|
||||
// All internal methods must return void
|
||||
if (name == vmSymbols::object_initializer_name()) {
|
||||
// All "<init>" methods must return void
|
||||
if ((length == 1) && (p[0] == JVM_SIGNATURE_VOID)) {
|
||||
return args_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue