daniellansun opened a new pull request, #3346:
URL: https://github.com/apache/groovy/pull/3346

   https://issues.apache.org/jira/browse/GROOVY-3056
   
   ExpandoMetaClass treated a registered `get`/`set`/`is` method as a property 
accessor only when the first or second character of the suffix was uppercase. 
Groovy forms the accessor for a property such as `_ajax` as `get_ajax`, because 
capitalizing a name that does not start with a lowercase letter leaves it 
unchanged, so the closure was never installed as the property and 
`getProperty("_ajax")` still returned the field.
   
   `isPropertyName` now accepts a suffix exactly when `BeanUtils.capitalize` 
leaves it unchanged. That keeps previously accepted forms (`getFoo`, `getURL`, 
`getuRL`) and also recognizes `_ajax`, `$id`, and a digit-leading name. 
`getfoo` / `setfoo` are still not accessors.
   
   This is a compatible widening on the current line, not a Groovy 7-only 
break. Coverage is in `Groovy3056` and the re-enabled 
`RegressionTest.testGroovy3056`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to