8213596: test failure with Graal when security manager and policy file are used

Reviewed-by: kvn
This commit is contained in:
Dean Long 2018-11-09 09:59:05 -08:00
parent 5e25c70198
commit db0221089f

@ -80,7 +80,16 @@ final class HotSpotGraalRuntimeMBean implements DynamicMBean {
return runtime;
}
private static final boolean DEBUG = Boolean.getBoolean(HotSpotGraalRuntimeMBean.class.getSimpleName() + ".debug");
private static final boolean DEBUG = initDebug();
private static boolean initDebug() {
try {
return Boolean.getBoolean(HotSpotGraalRuntimeMBean.class.getSimpleName() + ".debug");
} catch (SecurityException e) {
// Swallow the exception
return false;
}
}
@Override
public Object getAttribute(String name) throws AttributeNotFoundException {