You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/04/13 10:08:00 UTC
[jira] [Commented] (GROOVY-11928) Make MetaClassImpl.getProperties() respect @Internal
[ https://issues.apache.org/jira/browse/GROOVY-11928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18073127#comment-18073127 ]
ASF GitHub Bot commented on GROOVY-11928:
-----------------------------------------
paulk-asert opened a new pull request, #2467:
URL: https://github.com/apache/groovy/pull/2467
(no comment)
> Make MetaClassImpl.getProperties() respect @Internal
> ----------------------------------------------------
>
> Key: GROOVY-11928
> URL: https://issues.apache.org/jira/browse/GROOVY-11928
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> MetaClassImpl.getProperties() does not check for @Internal annotations on fields or getter/setter methods. This creates an inconsistency:
> * At compile time, BeanUtils.getAllProperties() already skips methods annotated with @Internal (since GROOVY-9081).
> * At runtime, MetaClassImpl.getProperties() does not check @Internal, so tools like JsonOutput.toJson(), println, and other property-introspection-based features expose internal properties.
> AST transforms that generate internal fields (often with $ in the name) currently rely on ad-hoc excludes logic or deemedInternalName() checks in each individual transform (@ToString, @EqualsAndHashCode, @Delegate, etc.). If getProperties() respected @Internal, these transforms could simply annotate generated fields/accessors with @Internal and the filtering would happen consistently everywhere — both at compile time and runtime.
> This supercedes GROOVY-11516 which looked for a simplistic solution for names containing "$" but never really solved all the cases.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)