diff --git a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySource.java b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySource.java index 02f6f905e85..cc9e8ac7a23 100644 --- a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySource.java +++ b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySource.java @@ -116,7 +116,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource } private String dotAppend(String prefix, String postfix) { - prefix = (prefix == null ? "" : prefix); if (StringUtils.hasText(prefix)) { return (prefix.endsWith(".") ? prefix + postfix : prefix + "." + postfix); }