--- old/src/hotspot/share/runtime/arguments.cpp 2019-10-01 15:26:59.610802317 -0700 +++ new/src/hotspot/share/runtime/arguments.cpp 2019-10-01 15:26:59.075782382 -0700 @@ -1454,7 +1454,7 @@ "--patch-module" }; void Arguments::check_unsupported_dumping_properties() { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, + assert(is_dumping_archive(), "this function is only used with CDS dump time"); assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be"); // If a vm option is found in the unsupported_options array, vm will exit with an error message. @@ -3537,7 +3537,7 @@ SharedArchivePath = get_default_shared_archive_path(); } else { int archives = num_archives(SharedArchiveFile); - if (DynamicDumpSharedSpaces || DumpSharedSpaces) { + if (is_dumping_archive()) { if (archives > 1) { vm_exit_during_initialization( "Cannot have more than 1 archive file specified in -XX:SharedArchiveFile during CDS dumping"); @@ -3550,7 +3550,7 @@ } } } - if (!DynamicDumpSharedSpaces && !DumpSharedSpaces){ + if (!is_dumping_archive()){ if (archives > 2) { vm_exit_during_initialization( "Cannot have more than 2 archive files specified in the -XX:SharedArchiveFile option");