Re: Groovy 5.0.7 and getter naming convention
Adrien Guichard <[email protected]> Fri, 17 Jul 2026 18:47:25 +0200
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <CAJHGhwCybU0tT23N_v5bmpYcqZ+DG3zvHhFJsxPKrawJDrJgiw@mail.gmail.com> |
--0000000000005dc5570656d150dc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, for this quick and simple test-case! Will have to debug to provide a relevant test-case on my side. Regards Le ven. 17 juil. 2026, 17:51, Jochen Theodorou <[email protected]> a =C3=A9= crit : > 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 > 5.0.7 then > > bye Jochen > > On 7/17/26 16:05, Adrien Guichard wrote: > > Hello, > > > > > > We are porting our framework to Grails 8.0.0(-M3), which defaults to > > Groovy 5.0.7. > > > > This framework generates getters from an AST Transformation at compile > > time. Symbols generated are then used into some DSLs to compose element= s > > of our apps. > > > > There is an exception when launching our test app if the name of the > > getters ends with an '_'; like in "getFirstName*_*()", if I replace the > > '_' with another char, it fails after (missing symbols, because I use > > 'someone.firstName_' in the code). > > > > Is there any restriction regarding the naming conventions for getters i= n > > Groovy 5 ? > > > > If not, I will dig further and fill an eventual bug report if needed. > > > > > > Regards > > > > -- > > Adrien Guichard > > + 33 6 10 78 75 88 > > Taack / Citel / Obsta > > 29 Boulevard Edgar Quinet > > 75014 Paris > > --0000000000005dc5570656d150dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"auto">Thanks, for this quick and simple test-c= ase!<div dir=3D"auto"><br></div><div>Will have to debug to provide a releva= nt test-case on my side.</div><div><br></div><div>Regards=C2=A0</div></div>= </div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">= Le ven. 17 juil. 2026, 17:51, Jochen Theodorou <<a href=3D"mailto:blackd= [email protected]" target=3D"_blank">[email protected]</a>> a =C3=A9crit=C2=A0= :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.= 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Adrien,<br> <br> I just tested with this code:<br> <br> class X {<br> =C2=A0 =C2=A0def getFirstName_(){"Adrien"}<br> }<br> <br> assert new X().firstName_ =3D=3D "Adrien"<br> <br> The assert works, no exception. I think this is not because of Groovy <br> 5.0.7 then<br> <br> bye Jochen<br> <br> On 7/17/26 16:05, Adrien Guichard wrote:<br> > Hello,<br> > <br> > <br> > We are=C2=A0porting our framework to Grails 8.0.0(-M3), which defaults= to <br> > Groovy 5.0.7.<br> > <br> > This framework=C2=A0generates getters from an AST Transformation at co= mpile <br> > time. Symbols generated are then used into some DSLs to compose elemen= ts <br> > of our apps.<br> > <br> > There is an exception when launching our test app if the name of the <= br> > getters ends with an '_'; like in "getFirstName*_*()"= ;, if I replace the <br> > '_' with another char, it fails after (missing symbols, becaus= e I use <br> > 'someone.firstName_' in the code).<br> > <br> > Is there any restriction regarding the naming conventions for getters = in <br> > Groovy 5 ?<br> > <br> > If not, I will dig further and fill an eventual bug report if needed.<= br> > <br> > <br> > Regards<br> > <br> > -- <br> > Adrien Guichard<br> > + 33 6 10 78 75 88<br> > Taack / Citel / Obsta<br> > 29 Boulevard Edgar Quinet<br> > 75014 Paris<br> <br> </blockquote></div> --0000000000005dc5570656d150dc--