diff --git a/src/hotspot/share/gc/g1/g1HeapRegion.cpp b/src/hotspot/share/gc/g1/g1HeapRegion.cpp index 03610ab520b..86b22486517 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegion.cpp +++ b/src/hotspot/share/gc/g1/g1HeapRegion.cpp @@ -245,7 +245,7 @@ G1HeapRegion::G1HeapRegion(uint hrm_index, _parsable_bottom(nullptr), _garbage_bytes(0), _incoming_refs(0), - _young_index_in_cset(-1), + _young_index_in_cset(InvalidCSetIndex), _surv_rate_group(nullptr), _age_index(G1SurvRateGroup::InvalidAgeIndex), _node_index(G1NUMA::UnknownNodeIndex), diff --git a/src/hotspot/share/gc/g1/g1HeapRegion.hpp b/src/hotspot/share/gc/g1/g1HeapRegion.hpp index 1962d3173b7..7d49633d0bc 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegion.hpp +++ b/src/hotspot/share/gc/g1/g1HeapRegion.hpp @@ -496,10 +496,10 @@ public: void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; } void clear_index_in_opt_cset() { _index_in_opt_cset = InvalidCSetIndex; } - uint young_index_in_cset() const { return _young_index_in_cset; } + uint young_index_in_cset() const { return _young_index_in_cset; } void clear_young_index_in_cset() { _young_index_in_cset = 0; } void set_young_index_in_cset(uint index) { - assert(index != UINT_MAX, "just checking"); + assert(index != InvalidCSetIndex, "just checking"); assert(index != 0, "just checking"); assert(is_young(), "pre-condition"); _young_index_in_cset = index;