Handle all getters first in JavaBeanBinder

Update `JavaBeanBinder.addProperties` to add both `get` and `is` methods
before `set`.

See gh-17005
pull/17068/head
Johnny Lim 6 years ago committed by Phillip Webb
parent 0b5bb6eb9d
commit f52ab0040f

@ -133,9 +133,9 @@ class JavaBeanBinder implements BeanBinder {
} }
for (Method method : declaredMethods) { for (Method method : declaredMethods) {
addMethodIfPossible(method, "get", 0, BeanProperty::addGetter); addMethodIfPossible(method, "get", 0, BeanProperty::addGetter);
addMethodIfPossible(method, "is", 0, BeanProperty::addGetter);
} }
for (Method method : declaredMethods) { for (Method method : declaredMethods) {
addMethodIfPossible(method, "is", 0, BeanProperty::addGetter);
addMethodIfPossible(method, "set", 1, BeanProperty::addSetter); addMethodIfPossible(method, "set", 1, BeanProperty::addSetter);
} }
for (Field field : declaredFields) { for (Field field : declaredFields) {

Loading…
Cancel
Save