Polish JavaBeanBinder

Closes gh-33762
This commit is contained in:
Moritz Halbritter 2023-01-12 09:45:36 +01:00
parent 3b2e5e5292
commit d6f682da7e
1 changed files with 1 additions and 5 deletions

View File

@ -304,15 +304,11 @@ class JavaBeanBinder implements DataObjectBinder {
}
void addGetter(Method getter) {
if (this.getter == null || isBetterGetter(getter)) {
if (this.getter == null || this.getter.getName().startsWith("is")) {
this.getter = getter;
}
}
private boolean isBetterGetter(Method getter) {
return this.getter != null && this.getter.getName().startsWith("is");
}
void addSetter(Method setter) {
if (this.setter == null || isBetterSetter(setter)) {
this.setter = setter;