From 74a8fffe9fbceaa3c25683895fb5ca8530392ee5 Mon Sep 17 00:00:00 2001 From: izeye Date: Tue, 17 May 2022 19:39:14 +0900 Subject: [PATCH] Polish LogbackRuntimeHintsRegistrarTests See gh-31074 --- .../logging/logback/LogbackRuntimeHintsRegistrarTests.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackRuntimeHintsRegistrarTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackRuntimeHintsRegistrarTests.java index 47645566eb1..89dc504a20f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackRuntimeHintsRegistrarTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackRuntimeHintsRegistrarTests.java @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; class LogbackRuntimeHintsRegistrarTests { @Test - void registersHintsForTypesCheckedByLogbackLoggingSystem() throws Exception { + void registersHintsForTypesCheckedByLogbackLoggingSystem() { ReflectionHints reflection = registerHints(); assertThat(reflection.getTypeHint(LoggerContext.class)).isNotNull(); assertThat(reflection.getTypeHint(SLF4JBridgeHandler.class)).isNotNull(); @@ -55,14 +55,12 @@ class LogbackRuntimeHintsRegistrarTests { @Test void registersHintsForBuiltInLogbackConverters() throws Exception { - RuntimeHints hints = new RuntimeHints(); - new LogbackRuntimeHintsRegistrar().registerHints(hints, getClass().getClassLoader()); ReflectionHints reflection = registerHints(); assertThat(logbackConverters()).allSatisfy(registeredForPublicConstructorInvocation(reflection)); } @Test - void registersHintsForSpringBootConverters() throws IOException, ClassNotFoundException, LinkageError { + void registersHintsForSpringBootConverters() throws LinkageError { ReflectionHints reflection = registerHints(); assertThat(List.of(ColorConverter.class, ExtendedWhitespaceThrowableProxyConverter.class, WhitespaceThrowableProxyConverter.class))