File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
log4j-core/src/main/java/org/apache/logging/log4j/core/async Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 4141import org .apache .logging .log4j .core .util .Log4jThreadFactory ;
4242import org .apache .logging .log4j .core .util .Throwables ;
4343import org .apache .logging .log4j .message .ReusableMessage ;
44- import org .apache .logging .log4j .util .LoaderUtil ;
4544
4645/**
4746 * Helper class decoupling the {@code AsyncLoggerConfig} class from the LMAX Disruptor library.
@@ -138,7 +137,9 @@ private void notifyIntermediateProgress(final long sequence) {
138137 * </p>
139138 */
140139 private static final class Log4jEventWrapperHandler3 extends Log4jEventWrapperHandler
141- implements SequenceReportingEventHandler <Log4jEventWrapper > {}
140+ implements SequenceReportingEventHandler <Log4jEventWrapper > {
141+ public Log4jEventWrapperHandler3 () {}
142+ }
142143
143144 /**
144145 * Factory used to populate the RingBuffer with events. These event objects are then re-used during the life of the
@@ -174,8 +175,10 @@ private static final class Log4jEventWrapperHandler3 extends Log4jEventWrapperHa
174175 private Log4jEventWrapperHandler createEventHandler () {
175176 if (DisruptorUtil .DISRUPTOR_MAJOR_VERSION == 3 ) {
176177 try {
177- return LoaderUtil .newInstanceOf (
178- "org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor$Log4jEventWrapperHandler3" );
178+ return (Log4jEventWrapperHandler ) Class .forName (
179+ "org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor$Log4jEventWrapperHandler3" )
180+ .getConstructor ()
181+ .newInstance ();
179182 } catch (final ReflectiveOperationException | LinkageError e ) {
180183 LOGGER .warn ("Failed to create event handler for LMAX Disruptor 3.x, trying version 4.x." , e );
181184 }
You can’t perform that action at this time.
0 commit comments