Affects Version/s: 3.0.5
Fix Version/s: None
Environment:Groovy >= 3..0.5
Java JDK jdk1.8.0_141
Windows 7 Prof 64 bit
we upgrade lately from Groovy 2.4 to Groovy 3.0.4 and then to 3.0.6. From this point some of our scripts started to fail. I reduced the source to the very problem, see example below.
Consider a class MyClass having a property Foo (mind the upper case name!).
The class has a function setFoo( String foo, String bar = '') which acts in our case as a convenience function to set two or more other properties in the class.
When we try to access the Property with getProperty("Foo"), we now get an Exception:
groovy.lang.MissingPropertyException: No such property: Foo for class: MyClass
Possible solutions: foo
From the outside it looks as if the function creates an new lowercase property foo behind the scenes and hides or destroys the uppercase property.
Last Groovy version where the example runs correctly ist 3.0.4, so Groovy 3.0.5 introduced the problem.