src/share/classes/java/util/logging/MemoryHandler.java
Print this page
*** 114,126 ****
/**
* Create a <tt>MemoryHandler</tt> and configure it based on
* <tt>LogManager</tt> configuration properties.
*/
public MemoryHandler() {
! sealed = false;
! configure();
! sealed = true;
LogManager manager = LogManager.getLogManager();
String handlerName = getClass().getName();
String targetName = manager.getProperty(handlerName+".target");
if (targetName == null) {
--- 114,124 ----
/**
* Create a <tt>MemoryHandler</tt> and configure it based on
* <tt>LogManager</tt> configuration properties.
*/
public MemoryHandler() {
! doWithControlPermission(this::configure);
LogManager manager = LogManager.getLogManager();
String handlerName = getClass().getName();
String targetName = manager.getProperty(handlerName+".target");
if (targetName == null) {
*** 162,174 ****
throw new NullPointerException();
}
if (size <= 0) {
throw new IllegalArgumentException();
}
! sealed = false;
! configure();
! sealed = true;
this.target = target;
this.pushLevel = pushLevel;
this.size = size;
init();
}
--- 160,170 ----
throw new NullPointerException();
}
if (size <= 0) {
throw new IllegalArgumentException();
}
! doWithControlPermission(this::configure);
this.target = target;
this.pushLevel = pushLevel;
this.size = size;
init();
}