Daniel Sun created GROOVY-11965:
-----------------------------------

             Summary: 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
         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)

Reply via email to