Closed michaelknigge closed 8 years ago
the search for the getter method is case insensitive:
String methodName = "get" + field.getName();
(...)
if (methodName.equalsIgnoreCase(method.getName())) {
So, unless we have more than one method with a similar name (eg. getname, getName, and getNAME) we should be fine. Can you agree with that?
Aaaarrrggghhhh, sorry.... you are right.... Shame on me, I've missed the "equalsIgnoreCase" :-(
The method UtilReflection.getFieldValue() tries (as a "fallback" try) to get the field value by calling a getter method. I guess this part of the function is (more or less) useless, because (if I got things right) your field names always begin with a lower case letter, but the getters are in camel case.
so for a field "name" (like in StructuredFieldBaseName) you would try to call a getter "getname" - which of couse does not exist because the letter after the "get" is always upper case.
Are there corner cases I've missed? If not, I would recommend removing this obsolete part.
bye, michael