Handle all getters first in JavaBeanBinder

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

See gh-17005
This commit is contained in:
Johnny Lim 2019-05-29 21:50:57 +09:00 committed by Phillip Webb
parent 0b5bb6eb9d
commit f52ab0040f
1 changed files with 1 additions and 1 deletions

View File

@ -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) {