Re: Groovy 5.0.7 and getter naming convention
Jochen Theodorou <[email protected]> Fri, 17 Jul 2026 17:51:22 +0200
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Adrien,
I just tested with this code:
class X {
def getFirstName_(){"Adrien"}
}
assert new X().firstName_ =3D=3D "Adrien"
The assert works, no exception. I think this is not because of Groovy=20
5.0.7 then
bye Jochen
On 7/17/26 16:05, Adrien Guichard wrote:
> Hello,
>=20
>=20
> We are=C2=A0porting our framework to Grails 8.0.0(-M3), which defaults t=
o=20
> Groovy 5.0.7.
>=20
> This framework=C2=A0generates getters from an AST Transformation at comp=
ile=20
> time. Symbols generated are then used into some DSLs to compose elements=
=20
> of our apps.
>=20
> There is an exception when launching our test app if the name of the=20
> getters ends with an '_'; like in "getFirstName*_*()", if I replace the=
=20
> '_' with another char, it fails after (missing symbols, because I use=20
> 'someone.firstName_' in the code).
>=20
> Is there any restriction regarding the naming conventions for getters in=
=20
> Groovy 5 ?
>=20
> If not, I will dig further and fill an eventual bug report if needed.
>=20
>=20
> Regards
>=20
> --=20
> Adrien Guichard
> + 33 6 10 78 75 88
> Taack / Citel / Obsta
> 29 Boulevard Edgar Quinet
> 75014 Paris