mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-02 12:39:14 +00:00
Cache capitalized name in SpEL's ReflectivePropertyAccessor
This commit is contained in:
+3
-2
@@ -624,11 +624,12 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
|
||||
}
|
||||
|
||||
if (this.member instanceof Method method) {
|
||||
String getterName = "get" + StringUtils.capitalize(name);
|
||||
String capitalizedName = StringUtils.capitalize(name);
|
||||
String getterName = "get" + capitalizedName;
|
||||
if (getterName.equals(method.getName())) {
|
||||
return true;
|
||||
}
|
||||
getterName = "is" + StringUtils.capitalize(name);
|
||||
getterName = "is" + capitalizedName;
|
||||
if (getterName.equals(method.getName())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user