[ https://issues.apache.org/jira/browse/GROOVY-9173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun reassigned GROOVY-9173: ---------------------------------- Assignee: Eric Milles > IllegalAccessError for class extending Java class that provides protected > getProperty/setProperty > ------------------------------------------------------------------------------------------------- > > Key: GROOVY-9173 > URL: https://issues.apache.org/jira/browse/GROOVY-9173 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.5.7 > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Fix For: 3.0.0-rc-2 > > Attachments: property-methods.zip > > > Consider the following: > PropertyBased.java > {code:java} > public class PropertyBased { > protected final Object getProperty(String name) { > return null; > } > protected final void setProperty(String name, Object value) { > } > } > {code} > Whatever.groovy > {code:groovy} > @groovy.transform.CompileStatic > class Whatever extends PropertyBased { > def getSomething() { > 'some thing' > } > } > {code} > No compiler errors are produced for Whatever having protected > "implementations" of GroovyObject methods. In this case, our legacy Java > base class has {{getProperty}} for non-Groovy reasons. However, when > accessing {{Whatever}} from dynamic Groovy code, {{IllegalAccessError}} is > thrown. See the attached (run {{gradlew test}}) -- This message was sent by Atlassian Jira (v8.3.4#803005)