--- old/src/share/vm/classfile/dictionary.cpp 2017-07-27 12:12:23.399684648 -0700 +++ new/src/share/vm/classfile/dictionary.cpp 2017-07-27 12:12:23.303680934 -0700 @@ -285,14 +285,13 @@ // Used to scan and relocate the classes during CDS archive dump. void Dictionary::classes_do(MetaspaceClosure* it) { + assert(DumpSharedSpaces, "dump-time only"); for (int index = 0; index < table_size(); index++) { for (DictionaryEntry* probe = bucket(index); probe != NULL; probe = probe->next()) { it->push(probe->klass_addr()); - if (DumpSharedSpaces) { - ((SharedDictionaryEntry*)probe)->metaspace_pointers_do(it); - } + ((SharedDictionaryEntry*)probe)->metaspace_pointers_do(it); } } }