|
|
|
Curiouser and curioser.
Because the Java beans spec mandates that a property name with two capitals at the start must have those left intact. So, as far as I understand it, Groovy and Spring are possibly at fault here. Normally this property munging of beans is transparent but in this first letter lower, second letter caps scenario it looks like it is falling apart. Groovy converting hCard to setHCard and getHCard is correct but possibly naive. The rule on double caps at start of property name not being lowercased perhaps needs a reverse counterpart where names with a single lowercase and then caps letter are not changed when generating getters/setters. Even then, with sethCard and gethCard, Spring should be returning the name as hCard but it appears to be lowercasing it all, which seems to violate the bean naming conventions. i.e. with a property name of ABCD spring should return ABCD according to my understanding of the bean spec, but it looks like (I haven't tried) it will return "abcd". |
||||||||||||||||||||||||||||||||||||||||||
def hCard is interpreted as a property called 'HCard' where as def hcard is correctly interpreted as 'hcard'. Not sure how to get around this. It's possibly caused by the way that groovy generates getter and setters names as the BeanInfo object contains setHCard/getHCard which I think is what confuses spring.
cheers
Lee