[ https://issues.apache.org/jira/browse/GROOVY-11667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-11667. ---------------------------------- Fix Version/s: 5.0.0-beta-1 Resolution: Fixed > GPathResult and attribute syntax within inner class > --------------------------------------------------- > > Key: GROOVY-11667 > URL: https://issues.apache.org/jira/browse/GROOVY-11667 > Project: Groovy > Issue Type: Bug > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Fix For: 5.0.0-beta-1 > > > This came in through the mailing list. > {code:java} > @Test > void testAttribute() { > def xml = ''' > <person> > <name>John Doe</name> > </person> > ''' > def path = getRoot(xml) > def text = pa...@id.text() ?: null > assert text == null > assert new Inner(path).@id == null > } > static class Inner { > protected id > Inner(GPathResult gpath) { > this.@id = gpa...@id.text() ?: null > } > } > {code} > The problem has to do with the overloads of getAttribute and setAttribute. -- This message was sent by Atlassian Jira (v8.20.10#820010)