8303930: Fix ConstantUtils.skipOverFieldSignature void case return value

Reviewed-by: mchung
This commit is contained in:
Chen Liang 2023-03-31 17:14:44 +00:00 committed by Mandy Chung
parent 4a5d7ca7d9
commit bdbf8fc61d
2 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -193,7 +193,7 @@ class ConstantUtils {
int index = start;
while (index < end) {
switch (descriptor.charAt(index)) {
case JVM_SIGNATURE_VOID: if (!voidOK) { return index; }
case JVM_SIGNATURE_VOID: if (!voidOK) { return 0; }
case JVM_SIGNATURE_BOOLEAN:
case JVM_SIGNATURE_BYTE:
case JVM_SIGNATURE_CHAR: