8162945: HotspotDiagnosticMXBean getFlags erroneously reports OutOfMemory

Reviewed-by: egahlin, dcubed
This commit is contained in:
Markus Grönlund 2016-08-02 18:36:47 +02:00
parent 09ec5eb035
commit b152d05787

@ -142,7 +142,7 @@ Java_com_sun_management_internal_Flag_getFlags
continue;
}
if (valueObj == NULL) {
if (valueObj == NULL && globals[i].type != JMM_VMGLOBAL_TYPE_JSTRING) {
free(globals);
JNU_ThrowOutOfMemoryError(env, 0);
return 0;