Skip to content

Commit 91e6c75

Browse files
committed
8260928: InitArrayShortSize constraint func should print a helpful error message
Reviewed-by: shade, chagedorn
1 parent cb127a4 commit 91e6c75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ JVMFlag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose) {
302302

303303
JVMFlag::Error InitArrayShortSizeConstraintFunc(intx value, bool verbose) {
304304
if (value % BytesPerLong != 0) {
305+
JVMFlag::printError(verbose,
306+
"InitArrayShortSize (" INTX_FORMAT ") must be "
307+
"a multiple of %d\n", value, BytesPerLong);
305308
return JVMFlag::VIOLATES_CONSTRAINT;
306309
} else {
307310
return JVMFlag::SUCCESS;

0 commit comments

Comments
 (0)