# HG changeset patch # User lmesnik # Date 1534882649 25200 # Node ID 492b366f8e5784cc4927c2c98f9b8a3f16c067eb # Parent 0cb2d4391e16ad7daedd293e4e890cacf646f22d 8209758: 2 classes with same name G1PrintCollectionSetClosure cause crash when logging is enabled Reviewed-by: tschatzl, kbarrett diff -r 0cb2d4391e16 -r 492b366f8e57 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