From f52ab0040f4dda03524211557e4c59a666ee843b Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Wed, 29 May 2019 21:50:57 +0900 Subject: [PATCH] Handle all getters first in JavaBeanBinder Update `JavaBeanBinder.addProperties` to add both `get` and `is` methods before `set`. See gh-17005 --- .../boot/context/properties/bind/JavaBeanBinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java index 65dbcb2910e..3d808d2f043 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java @@ -133,9 +133,9 @@ class JavaBeanBinder implements BeanBinder { } for (Method method : declaredMethods) { addMethodIfPossible(method, "get", 0, BeanProperty::addGetter); + addMethodIfPossible(method, "is", 0, BeanProperty::addGetter); } for (Method method : declaredMethods) { - addMethodIfPossible(method, "is", 0, BeanProperty::addGetter); addMethodIfPossible(method, "set", 1, BeanProperty::addSetter); } for (Field field : declaredFields) {