diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp index e296c501ccb..0712ccda240 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp @@ -3168,7 +3168,7 @@ void InstanceKlass::verify_on(outputStream* st) { Array* method_ordering = this->method_ordering(); int length = method_ordering->length(); if (JvmtiExport::can_maintain_original_method_order() || - (UseSharedSpaces && length != 0)) { + ((UseSharedSpaces || DumpSharedSpaces) && length != 0)) { guarantee(length == methods()->length(), "invalid method ordering length"); jlong sum = 0; for (int j = 0; j < length; j++) {