[
https://issues.apache.org/jira/browse/GROOVY-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10438:
---------------------------------
Issue Type: Improvement (was: Question)
> DGM: getMetaPropertyValues and getProperties includes private entries
> ---------------------------------------------------------------------
>
> Key: GROOVY-10438
> URL: https://issues.apache.org/jira/browse/GROOVY-10438
> Project: Groovy
> Issue Type: Improvement
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-1
>
>
> Consider the following:
> {code:groovy}
> class C {
> private getX() {}
> protected getY() {}
> @groovy.transform.PackageScope getZ() {}
> }
> C.metaClass.properties.each {
> println it.name + ': ' +
> org.codehaus.groovy.ast.AstToTextHelper.getModifiersText(it.modifiers)
> }
> {code}
> The metaClass properties includes all visibilities. And the example could
> probably be extended to show static stuff as well.
> {code}
> class: public final native
> z: <package-private>
> y: protected
> x: private
> {code}
> These properties are used (unfiltered) to generate the results for
> DefaultGroovyMethods getMetaPropertyValues and getProperties. GROOVY-5169
> and GROOVY-7682 are partially caused by this.
> *Should the extension methods return private properties?*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)