--- old/src/hotspot/share/interpreter/rewriter.cpp 2018-03-07 11:03:32.946960190 -0800 +++ new/src/hotspot/share/interpreter/rewriter.cpp 2018-03-07 11:03:32.703937286 -0800 @@ -111,12 +111,12 @@ if (HAS_PENDING_EXCEPTION) { MetadataFactory::free_metadata(loader_data, cache); _pool->set_cache(NULL); // so the verifier isn't confused + } else { + DEBUG_ONLY( + if (DumpSharedSpaces) { + cache->verify_just_initialized(); + }) } - - DEBUG_ONLY( - if (DumpSharedSpaces) { - cache->verify_just_initialized(); - }) }