Eric Milles created GROOVY-11667:
------------------------------------
Summary: 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
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 = [email protected]() ?: null
assert text == null
assert new Inner(path).@id == null
}
static class Inner {
protected id
Inner(GPathResult gpath) {
this.@id = [email protected]() ?: 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)