Eric Milles created GROOVY-10438:
------------------------------------

             Summary: DGM: getMetaPropertyValues and getProperties includes 
private entries
                 Key: GROOVY-10438
                 URL: https://issues.apache.org/jira/browse/GROOVY-10438
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles


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 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.1#820001)

Reply via email to