You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2025/12/01 20:19:00 UTC
[jira] [Resolved] (GROOVY-10198) Extending a class via its superclass' metaclass changes method visibility rules
[ https://issues.apache.org/jira/browse/GROOVY-10198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-10198.
----------------------------------
Resolution: Fixed
> Extending a class via its superclass' metaclass changes method visibility rules
> -------------------------------------------------------------------------------
>
> Key: GROOVY-10198
> URL: https://issues.apache.org/jira/browse/GROOVY-10198
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Reporter: L
> Assignee: Eric Milles
> Priority: Major
> Fix For: 6.0.0-alpha-1
>
> Attachments: Test1.groovy
>
>
> Private fields/methods of a superclass are not accessible in groovy, see GROOVY-3142
> But if some superclasses in the class hierarchy is extended via its metaclass, private methods become visible.
> This happens in all the latest 2.X (2.4.21), 3.X (3.0.8) and 4.X (4.0.0-alpha-3) versions.
>
> Attached is a simple groovy script that demonstrates it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)