src/share/classes/java/util/logging/Handler.java
Print this page
*** 60,72 ****
private volatile Formatter formatter;
private volatile Level logLevel = Level.ALL;
private volatile ErrorManager errorManager = new ErrorManager();
private volatile String encoding;
! // Package private support for security checking. When sealed
! // is true, we access check updates to the class.
! boolean sealed = true;
/**
* Default constructor. The resulting <tt>Handler</tt> has a log
* level of <tt>Level.ALL</tt>, no <tt>Formatter</tt>, and no
* <tt>Filter</tt>. A default <tt>ErrorManager</tt> instance is installed
--- 60,74 ----
private volatile Formatter formatter;
private volatile Level logLevel = Level.ALL;
private volatile ErrorManager errorManager = new ErrorManager();
private volatile String encoding;
! // Package private support for security checking. When isSealed
! // returns true, we access check updates to the class.
! boolean isSealed() {
! return true;
! }
/**
* Default constructor. The resulting <tt>Handler</tt> has a log
* level of <tt>Level.ALL</tt>, no <tt>Formatter</tt>, and no
* <tt>Filter</tt>. A default <tt>ErrorManager</tt> instance is installed
*** 304,313 ****
// Package-private support method for security checks.
// If "sealed" is true, we check that the caller has
// appropriate security privileges to update Handler
// state and if not throw a SecurityException.
void checkPermission() throws SecurityException {
! if (sealed) {
manager.checkPermission();
}
}
}
--- 306,315 ----
// Package-private support method for security checks.
// If "sealed" is true, we check that the caller has
// appropriate security privileges to update Handler
// state and if not throw a SecurityException.
void checkPermission() throws SecurityException {
! if (isSealed()) {
manager.checkPermission();
}
}
}