hotspot/src/share/vm/classfile/classFileParser.cpp
changeset 38313 615905db3fe4
parent 38177 b0c9cb06506b
child 38701 5f0770ab49d9
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue May 17 17:40:19 2016 +0000
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue May 17 17:42:16 2016 -0400
@@ -5708,8 +5708,10 @@
 
 #if INCLUDE_CDS
     if (DumpLoadedClassList != NULL && stream->source() != NULL && classlist_file->is_open()) {
-      // Only dump the classes that can be stored into CDS archive
-      if (SystemDictionaryShared::is_sharing_possible(_loader_data)) {
+      // Only dump the classes that can be stored into CDS archive.
+      // Anonymous classes such as generated LambdaForm classes are also not included.
+      if (SystemDictionaryShared::is_sharing_possible(_loader_data) &&
+          _host_klass == NULL) {
         ResourceMark rm(THREAD);
         classlist_file->print_cr("%s", _class_name->as_C_string());
         classlist_file->flush();