--- old/src/hotspot/share/classfile/dictionary.cpp 2020-03-26 15:57:37.000000000 -0700 +++ new/src/hotspot/share/classfile/dictionary.cpp 2020-03-26 15:57:36.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -354,6 +354,7 @@ // since been unreferenced, so this entry should be cleared. void Dictionary::clean_cached_protection_domains() { assert_locked_or_safepoint(SystemDictionary_lock); + assert(!loader_data()->has_class_mirror_holder(), "cld should have a ClassLoader holder not a Class holder"); if (loader_data()->is_the_null_class_loader_data()) { // Classes in the boot loader are not loaded with protection domains @@ -482,6 +483,7 @@ ResourceMark rm; assert(loader_data() != NULL, "loader data should not be null"); + assert(!loader_data()->has_class_mirror_holder(), "cld should have a ClassLoader holder not a Class holder"); st->print_cr("Java dictionary (table_size=%d, classes=%d, resizable=%s)", table_size(), number_of_entries(), BOOL_TO_STR(_resizable)); st->print_cr("^ indicates that initiating loader is different from defining loader");