1
0

Deprecation-Warnung in Bootstrap-Tests bereinigt

This commit is contained in:
2026-04-09 09:45:18 +02:00
parent 7b7af28d12
commit b13d8ba0e1
2 changed files with 4 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.Property;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
@@ -380,7 +381,7 @@ class BootstrapRunnerTest {
String appenderName = "TestCapture-" + UUID.randomUUID();
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration cfg = ctx.getConfiguration();
AbstractAppender captureAppender = new AbstractAppender(appenderName, null, null, false) {
AbstractAppender captureAppender = new AbstractAppender(appenderName, null, null, false, Property.EMPTY_ARRAY) {
@Override
public void append(LogEvent event) {
capturedMessages.add(event.getMessage().getFormattedMessage());

View File

@@ -11,6 +11,7 @@ import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.Property;
/**
* Test utility that captures Log4j2 log events during test execution.
@@ -113,7 +114,7 @@ class TestLogCapture {
private final List<LogEvent> events = new ArrayList<>();
ListAppender(String name) {
super(name, null, null, false);
super(name, null, null, false, Property.EMPTY_ARRAY);
}
@Override