Skip to content

Commit 21fba0d

Browse files
committed
Simplify MonitorResourcesTest
1 parent 3878fb6 commit 21fba0d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

log4j-core-test/src/test/java/org/apache/logging/log4j/core/MonitorResourcesTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,10 @@ void test_reconfiguration(@TempDir(cleanup = CleanupMode.ON_SUCCESS) final Path
5353
final ConfigurationSource configSource = new ConfigurationSource(new Source(configFile), new byte[] {}, 0);
5454
final int monitorInterval = 3;
5555

56-
ComponentBuilder<?> monitorResourcesComponent = configBuilder.newComponent("MonitorResources");
57-
monitorResourcesComponent.addComponent(monitorResourcesComponent
58-
.getBuilder()
59-
.newComponent("MonitorResource")
56+
final ComponentBuilder<?> monitorResourcesComponent = configBuilder.newComponent("MonitorResources");
57+
monitorResourcesComponent.addComponent(configBuilder.newComponent("MonitorResource")
6058
.addAttribute("uri", externalResourceFile1.toUri().toString()));
61-
monitorResourcesComponent.addComponent(monitorResourcesComponent
62-
.getBuilder()
63-
.newComponent("MonitorResource")
59+
monitorResourcesComponent.addComponent(configBuilder.newComponent("MonitorResource")
6460
.addAttribute("uri", externalResourceFile2.toUri().toString()));
6561

6662
final Configuration config = configBuilder

0 commit comments

Comments
 (0)