Skip to content
Permalink
Browse files
8260928: InitArrayShortSize constraint func should print a helpful er…
…ror message

Reviewed-by: shade, chagedorn
  • Loading branch information
TobiHartmann committed Feb 3, 2021
1 parent cb127a4 commit 91e6c755f32dada6c62bad4ff4221aed75a0ccc2
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp
@@ -302,6 +302,9 @@ JVMFlag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose) {

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

0 comments on commit 91e6c75

Please sign in to comment.