diff --git a/src/hotspot/share/gc/shared/ageTable.cpp b/src/hotspot/share/gc/shared/ageTable.cpp index 376aaa16391c6..34e4bb91887a0 100644 --- a/src/hotspot/share/gc/shared/ageTable.cpp +++ b/src/hotspot/share/gc/shared/ageTable.cpp @@ -72,8 +72,8 @@ void AgeTable::clear() { } #ifndef PRODUCT -bool AgeTable::is_clear() { - for (size_t* p = sizes; p < sizes + table_size; ++p) { +bool AgeTable::is_clear() const { + for (const size_t* p = sizes; p < sizes + table_size; ++p) { if (*p != 0) return false; } return true; diff --git a/src/hotspot/share/gc/shared/ageTable.hpp b/src/hotspot/share/gc/shared/ageTable.hpp index 20d444350858d..decade6ee8581 100644 --- a/src/hotspot/share/gc/shared/ageTable.hpp +++ b/src/hotspot/share/gc/shared/ageTable.hpp @@ -56,7 +56,7 @@ class AgeTable: public CHeapObj { #ifndef PRODUCT // check whether it's clear - bool is_clear(); + bool is_clear() const; #endif // !PRODUCT // add entry