8209758: 2 classes with same name G1PrintCollectionSetClosure cause crash when logging is enabled jdk-12+8
authorlmesnik
Tue, 21 Aug 2018 13:17:29 -0700
changeset 51475 492b366f8e57
parent 51474 0cb2d4391e16
child 51476 6c0ac4b4d761
8209758: 2 classes with same name G1PrintCollectionSetClosure cause crash when logging is enabled Reviewed-by: tschatzl, kbarrett
src/hotspot/share/gc/g1/g1CollectionSet.cpp
--- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp	Tue Aug 21 14:14:28 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp	Tue Aug 21 13:17:29 2018 -0700
@@ -328,10 +328,10 @@
   return cl.valid();
 }
 
-class G1PrintCollectionSetClosure : public HeapRegionClosure {
+class G1PrintCollectionSetDetailClosure : public HeapRegionClosure {
   outputStream* _st;
 public:
-  G1PrintCollectionSetClosure(outputStream* st) : HeapRegionClosure(), _st(st) { }
+  G1PrintCollectionSetDetailClosure(outputStream* st) : HeapRegionClosure(), _st(st) { }
 
   virtual bool do_heap_region(HeapRegion* r) {
     assert(r->in_collection_set(), "Region %u should be in collection set", r->hrm_index());
@@ -347,7 +347,7 @@
 void G1CollectionSet::print(outputStream* st) {
   st->print_cr("\nCollection_set:");
 
-  G1PrintCollectionSetClosure cl(st);
+  G1PrintCollectionSetDetailClosure cl(st);
   iterate(&cl);
 }
 #endif // !PRODUCT