8206476: Wrong assert in phase_enum_2_phase_string() in referenceProcessorPhaseTimes.cpp
authortschatzl
Tue, 10 Jul 2018 15:09:34 +0200
changeset 51025 e4ca45413ddd
parent 51024 3fd01bccc81f
child 51026 510ac4c08610
8206476: Wrong assert in phase_enum_2_phase_string() in referenceProcessorPhaseTimes.cpp Summary: A less or equal than should be less than. Reviewed-by: ehelin, kbarrett
src/hotspot/share/gc/shared/referenceProcessorPhaseTimes.cpp
--- a/src/hotspot/share/gc/shared/referenceProcessorPhaseTimes.cpp	Fri Jun 29 17:59:44 2018 +0200
+++ b/src/hotspot/share/gc/shared/referenceProcessorPhaseTimes.cpp	Tue Jul 10 15:09:34 2018 +0200
@@ -80,8 +80,7 @@
 STATIC_ASSERT((REF_PHANTOM + 1) == ARRAY_SIZE(ReferenceTypeNames));
 
 static const char* phase_enum_2_phase_string(ReferenceProcessor::RefProcPhases phase) {
-  assert(phase >= ReferenceProcessor::RefPhase1 && phase <= ReferenceProcessor::RefPhaseMax,
-         "Invalid reference processing phase (%d)", phase);
+  ASSERT_PHASE(phase);
   return PhaseNames[phase];
 }