You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/03/08 12:17:01 UTC

[jira] [Closed] (GROOVY-4365) Compiler does not do access check at classgen time and invalid class fails with IllegalAccessError later

     [ https://issues.apache.org/jira/browse/GROOVY-4365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-4365.
-----------------------------

> Compiler does not do access check at classgen time and invalid class fails with IllegalAccessError later
> --------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-4365
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4365
>             Project: Groovy
>          Issue Type: Bug
>          Components: class generator
>    Affects Versions: 1.7.5, 2.4.0-rc-1
>            Reporter: Roshan Dawrani
>            Assignee: Eric Milles
>            Priority: Major
>
> {code}
> class MyHashMap extends HashMap {
>     static class MyEntry extends HashMap.Entry { }
> }
> println MyHashMap.MyEntry
> {code}
> Code above fails with
> {noformat}
> Caught: java.lang.IllegalAccessError: class MyHashMap$MyEntry cannot access its superclass java.util.HashMap$Entry
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)