mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-03 19:00:52 +01:00
remove SunAwtAppContextInitiator, because it cases a lot of exceptions
This commit is contained in:
@@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor;
|
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor;
|
||||||
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorFactory;
|
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorFactory;
|
||||||
import se.jiderhamn.classloader.leak.prevention.cleanup.MBeanCleanUp;
|
import se.jiderhamn.classloader.leak.prevention.cleanup.MBeanCleanUp;
|
||||||
|
import se.jiderhamn.classloader.leak.prevention.preinit.SunAwtAppContextInitiator;
|
||||||
import sonia.scm.lifecycle.LifeCycle;
|
import sonia.scm.lifecycle.LifeCycle;
|
||||||
import sonia.scm.plugin.ChildFirstPluginClassLoader;
|
import sonia.scm.plugin.ChildFirstPluginClassLoader;
|
||||||
import sonia.scm.plugin.DefaultPluginClassLoader;
|
import sonia.scm.plugin.DefaultPluginClassLoader;
|
||||||
@@ -38,6 +39,9 @@ public final class ClassLoaderLifeCycle implements LifeCycle {
|
|||||||
public static ClassLoaderLifeCycle create() {
|
public static ClassLoaderLifeCycle create() {
|
||||||
ClassLoaderLeakPreventorFactory classLoaderLeakPreventorFactory = new ClassLoaderLeakPreventorFactory();
|
ClassLoaderLeakPreventorFactory classLoaderLeakPreventorFactory = new ClassLoaderLeakPreventorFactory();
|
||||||
classLoaderLeakPreventorFactory.setLogger(new LoggingAdapter());
|
classLoaderLeakPreventorFactory.setLogger(new LoggingAdapter());
|
||||||
|
// the SunAwtAppContextInitiator causes a lot of exceptions and we use no awt
|
||||||
|
classLoaderLeakPreventorFactory.removePreInitiator(SunAwtAppContextInitiator.class);
|
||||||
|
// the MBeanCleanUp causes a Exception and we use no mbeans
|
||||||
classLoaderLeakPreventorFactory.removeCleanUp(MBeanCleanUp.class);
|
classLoaderLeakPreventorFactory.removeCleanUp(MBeanCleanUp.class);
|
||||||
return new ClassLoaderLifeCycle(Thread.currentThread().getContextClassLoader(), classLoaderLeakPreventorFactory);
|
return new ClassLoaderLifeCycle(Thread.currentThread().getContextClassLoader(), classLoaderLeakPreventorFactory);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user