|
25 | 25 | import java.lang.annotation.Target;
|
26 | 26 | import java.net.ProtocolException;
|
27 | 27 | import java.util.ArrayList;
|
| 28 | +import java.util.Collections; |
28 | 29 | import java.util.EnumSet;
|
29 | 30 | import java.util.LinkedHashMap;
|
30 | 31 | import java.util.List;
|
@@ -330,7 +331,7 @@ static Stream<Arguments> standardConfigLocations() {
|
330 | 331 | // - The tree parser used internally by that configuration factory
|
331 | 332 | return Stream.of(
|
332 | 333 | // No classes, only XML
|
333 |
| - Arguments.of(List.of(), List.of(".xml")), |
| 334 | + Arguments.of(Collections.emptyList(), List.of(".xml")), |
334 | 335 | // Log4j Core 2
|
335 | 336 | Arguments.of(List.of(JsonConfigurationFactory.class.getName(), ObjectMapper.class.getName()),
|
336 | 337 | List.of(".json", ".jsn", ".xml")),
|
@@ -366,18 +367,18 @@ void standardConfigLocations(List<String> availableClasses, List<String> expecte
|
366 | 367 | String[] locations = this.loggingSystem.getStandardConfigLocations();
|
367 | 368 | assertThat(locations).hasSize(4 * expectedSuffixes.size());
|
368 | 369 | List<String> expected = new ArrayList<>();
|
369 |
| - expectedSuffixes.forEach(s -> expected.add("log4j2-test" + this.contextName + s)); |
370 |
| - expectedSuffixes.forEach(s -> expected.add("log4j2-test" + s)); |
371 |
| - expectedSuffixes.forEach(s -> expected.add("log4j2" + this.contextName + s)); |
372 |
| - expectedSuffixes.forEach(s -> expected.add("log4j2" + s)); |
| 370 | + expectedSuffixes.forEach((s) -> expected.add("log4j2-test" + this.contextName + s)); |
| 371 | + expectedSuffixes.forEach((s) -> expected.add("log4j2-test" + s)); |
| 372 | + expectedSuffixes.forEach((s) -> expected.add("log4j2" + this.contextName + s)); |
| 373 | + expectedSuffixes.forEach((s) -> expected.add("log4j2" + s)); |
373 | 374 | assertThat(locations).containsExactlyElementsOf(expected);
|
374 | 375 | }
|
375 | 376 |
|
376 | 377 | @Test
|
377 | 378 | void springConfigLocations() {
|
378 | 379 | String[] locations = getSpringConfigLocations(this.loggingSystem);
|
379 |
| - assertThat(locations).containsExactly("log4j2-test" + contextName + "-spring.xml", "log4j2-test-spring.xml", |
380 |
| - "log4j2" + contextName + "-spring.xml", "log4j2-spring.xml"); |
| 380 | + assertThat(locations).containsExactly("log4j2-test" + this.contextName + "-spring.xml", |
| 381 | + "log4j2-test-spring.xml", "log4j2" + this.contextName + "-spring.xml", "log4j2-spring.xml"); |
381 | 382 | }
|
382 | 383 |
|
383 | 384 | @Test
|
|
0 commit comments