diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java index 8824b65cef..0c055004e9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java @@ -239,10 +239,7 @@ public class SessionAutoConfiguration { private void addCandidateIfAvailable(List> candidates, String type) { try { - Class candidate = Class.forName(type, false, this.classLoader); - if (candidate != null) { - candidates.add(candidate); - } + candidates.add(Class.forName(type, false, this.classLoader)); } catch (Throwable ex) { // Ignore