diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java index f3ec7f5941..12898ec32d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java @@ -108,7 +108,7 @@ public class LdapProperties { } private int determinePort(Environment environment) { - Assert.state(environment != null, "No local LDAP port configured"); + Assert.notNull(environment, "Environment must not be null"); String localPort = environment.getProperty("local.ldap.port"); if (localPort != null) { return Integer.valueOf(localPort);