Skip to content

Commit f52ab00

Browse files
izeyephilwebb
authored andcommitted
Handle all getters first in JavaBeanBinder
Update `JavaBeanBinder.addProperties` to add both `get` and `is` methods before `set`. See gh-17005
1 parent 0b5bb6e commit f52ab00

File tree

1 file changed

+1
-1
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ protected void addProperties(Method[] declaredMethods, Field[] declaredFields) {
133133
}
134134
for (Method method : declaredMethods) {
135135
addMethodIfPossible(method, "get", 0, BeanProperty::addGetter);
136+
addMethodIfPossible(method, "is", 0, BeanProperty::addGetter);
136137
}
137138
for (Method method : declaredMethods) {
138-
addMethodIfPossible(method, "is", 0, BeanProperty::addGetter);
139139
addMethodIfPossible(method, "set", 1, BeanProperty::addSetter);
140140
}
141141
for (Field field : declaredFields) {

0 commit comments

Comments
 (0)