Made sure StackTraceSimplifier is always loaded

This commit is contained in:
Trustin Lee 2008-09-26 02:57:10 +00:00
parent 824e0034c4
commit ebdcb21421

View File

@ -49,6 +49,13 @@ import org.jboss.netty.util.StackTraceSimplifier;
public abstract class InternalLoggerFactory { public abstract class InternalLoggerFactory {
private static volatile InternalLoggerFactory defaultFactory = new JdkLoggerFactory(); private static volatile InternalLoggerFactory defaultFactory = new JdkLoggerFactory();
static {
// Load the dependent classes in advance to avoid the case where
// the VM fails to load the required classes because of too many open
// files.
StackTraceSimplifier.simplify(new Exception());
}
/** /**
* Returns the default factory. The initial default factory is * Returns the default factory. The initial default factory is
* {@link JdkLoggerFactory}. * {@link JdkLoggerFactory}.