Skip to content

Commit 384a623

Browse files
committed
Merge branch '3.3.x'
Closes gh-42625
2 parents 8704448 + 8a783df commit 384a623

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private Validator getSelfValidator(Bindable<?> target) {
154154
return (value instanceof Validator validator) ? validator : null;
155155
}
156156
Class<?> type = target.getType().resolve();
157-
if (Validator.class.isAssignableFrom(type)) {
157+
if (type != null && Validator.class.isAssignableFrom(type)) {
158158
return new SelfValidatingConstructorBoundBindableValidator(type);
159159
}
160160
return null;
@@ -203,7 +203,7 @@ static void register(BeanDefinitionRegistry registry) {
203203
.rootBeanDefinition(ConfigurationPropertiesBinderFactory.class)
204204
.getBeanDefinition();
205205
definition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
206-
registry.registerBeanDefinition(ConfigurationPropertiesBinder.BEAN_NAME, definition);
206+
registry.registerBeanDefinition(BEAN_NAME, definition);
207207
}
208208
}
209209

0 commit comments

Comments
 (0)