mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
remove MBeanCleanUp step to avoid exception on restart
This commit is contained in:
@@ -5,6 +5,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor;
|
||||
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorFactory;
|
||||
import se.jiderhamn.classloader.leak.prevention.cleanup.MBeanCleanUp;
|
||||
import sonia.scm.plugin.ChildFirstPluginClassLoader;
|
||||
import sonia.scm.plugin.DefaultPluginClassLoader;
|
||||
|
||||
@@ -36,6 +37,7 @@ public final class ClassLoaderLifeCycle {
|
||||
public static ClassLoaderLifeCycle create() {
|
||||
ClassLoaderLeakPreventorFactory classLoaderLeakPreventorFactory = new ClassLoaderLeakPreventorFactory();
|
||||
classLoaderLeakPreventorFactory.setLogger(new LoggingAdapter());
|
||||
classLoaderLeakPreventorFactory.removeCleanUp(MBeanCleanUp.class);
|
||||
return new ClassLoaderLifeCycle(Thread.currentThread().getContextClassLoader(), classLoaderLeakPreventorFactory);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor;
|
||||
*/
|
||||
public class LoggingAdapter implements se.jiderhamn.classloader.leak.prevention.Logger {
|
||||
|
||||
@SuppressWarnings("squid:S3416") // suppress "loggers should be named for their enclosing classes" rule
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClassLoaderLeakPreventor.class);
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user