File tree 1 file changed +7
-4
lines changed
log4j-core/src/main/java/org/apache/logging/log4j/core/async
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 41
41
import org .apache .logging .log4j .core .util .Log4jThreadFactory ;
42
42
import org .apache .logging .log4j .core .util .Throwables ;
43
43
import org .apache .logging .log4j .message .ReusableMessage ;
44
- import org .apache .logging .log4j .util .LoaderUtil ;
45
44
46
45
/**
47
46
* Helper class decoupling the {@code AsyncLoggerConfig} class from the LMAX Disruptor library.
@@ -138,7 +137,9 @@ private void notifyIntermediateProgress(final long sequence) {
138
137
* </p>
139
138
*/
140
139
private static final class Log4jEventWrapperHandler3 extends Log4jEventWrapperHandler
141
- implements SequenceReportingEventHandler <Log4jEventWrapper > {}
140
+ implements SequenceReportingEventHandler <Log4jEventWrapper > {
141
+ public Log4jEventWrapperHandler3 () {}
142
+ }
142
143
143
144
/**
144
145
* 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
174
175
private Log4jEventWrapperHandler createEventHandler () {
175
176
if (DisruptorUtil .DISRUPTOR_MAJOR_VERSION == 3 ) {
176
177
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 ();
179
182
} catch (final ReflectiveOperationException | LinkageError e ) {
180
183
LOGGER .warn ("Failed to create event handler for LMAX Disruptor 3.x, trying version 4.x." , e );
181
184
}
You can’t perform that action at this time.
0 commit comments