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 2026/10/20 01:28:01 UTC

[jira] [Closed] (GROOVY-11965) groovydoc incorrectly includes members declared inside anonymous Java class bodies in the generated documentation of the enclosing class

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

Paul King closed GROOVY-11965.
------------------------------

> groovydoc incorrectly includes members declared inside anonymous Java class bodies in the generated documentation of the enclosing class
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11965
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11965
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Daniel Sun
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 6.0.0-alpha-1
>
>         Attachments: Sql (Groovy 6.0.0-SNAPSHOT).html
>
>
> A visible example for {{groovy.sql.Sql}} is attached, whose generated groovydoc currently shows duplicate {{getType}} and duplicate {{getValue}} methods.
> These methods are not declared by {{Sql}} itself. They come from anonymous implementations used internally by helper methods such as in(...) and inout(...), but the Java-side groovydoc visitor traverses those anonymous class
> bodies and attaches their members to the enclosing class doc.
> *Expected behavior*
> Only members actually declared by the enclosing type should appear in its groovydoc. Members from anonymous class bodies should remain implementation details and must not be rendered as part of the outer class API.
> *Impact*
> This produces incorrect API documentation, introduces duplicate method entries, and makes affected Java classes appear to expose members they do not actually declare.
> *Notes*
> The issue is structural and is not limited to getType / getValue; other methods, fields, constructors, or local types inside anonymous class bodies may also leak into generated docs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)