Eric Milles created GROOVY-10443:
------------------------------------
Summary: final field analysis false positive
Key: GROOVY-10443
URL: https://issues.apache.org/jira/browse/GROOVY-10443
Project: Groovy
Issue Type: Bug
Reporter: Eric Milles
Consider the following:
{code:groovy}
class M extends HashMap {
protected final foo
M() {
this.foo = null
}
}
class X extends M {
void test() {
foo = null // cannot modify final field 'foo' outside of constructor
this.foo = null // Map#put
}
}
{code}
"foo = null" is flagged as a write to a final field. It is not; {{Map#put}} is
called in this case. "this.foo = null" has no error.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)