Skip to content

Commit 1b412dc

Browse files
committed
fix: Check style failures
Signed-off-by: Piotr P. Karwasz <[email protected]>
1 parent 2c40cad commit 1b412dc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.lang.annotation.Target;
2626
import java.net.ProtocolException;
2727
import java.util.ArrayList;
28+
import java.util.Collections;
2829
import java.util.EnumSet;
2930
import java.util.LinkedHashMap;
3031
import java.util.List;
@@ -330,7 +331,7 @@ static Stream<Arguments> standardConfigLocations() {
330331
// - The tree parser used internally by that configuration factory
331332
return Stream.of(
332333
// No classes, only XML
333-
Arguments.of(List.of(), List.of(".xml")),
334+
Arguments.of(Collections.emptyList(), List.of(".xml")),
334335
// Log4j Core 2
335336
Arguments.of(List.of(JsonConfigurationFactory.class.getName(), ObjectMapper.class.getName()),
336337
List.of(".json", ".jsn", ".xml")),
@@ -366,18 +367,18 @@ void standardConfigLocations(List<String> availableClasses, List<String> expecte
366367
String[] locations = this.loggingSystem.getStandardConfigLocations();
367368
assertThat(locations).hasSize(4 * expectedSuffixes.size());
368369
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));
373374
assertThat(locations).containsExactlyElementsOf(expected);
374375
}
375376

376377
@Test
377378
void springConfigLocations() {
378379
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");
381382
}
382383

383384
@Test

0 commit comments

Comments
 (0)