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 2020/05/11 10:52:00 UTC

[jira] [Assigned] (GROOVY-9546) Annotations on class signature are rendered incorrectly

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

Paul King reassigned GROOVY-9546:
---------------------------------

    Assignee: Paul King

> Annotations on class signature are rendered incorrectly
> -------------------------------------------------------
>
>                 Key: GROOVY-9546
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9546
>             Project: Groovy
>          Issue Type: Bug
>          Components: GroovyDoc
>    Affects Versions: 3.0.3
>            Reporter: Damir Murat
>            Assignee: Paul King
>            Priority: Minor
>         Attachments: image-2020-05-10-17-42-34-810.png, image-2020-05-10-17-47-00-858.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When I have an annotated class, generated groovydoc contains a link to the annotation and appended annotation name just after it as in following screenshot:
> !image-2020-05-10-17-47-00-858.png!
> After some debugging, I managed to fix the issue by modifying
> {code:java}
> org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html.annotations(){code}
> like this:
> {noformat}
> def annotations = { t, sepChar ->
>     // t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + linkable(it.type().typeName()) + (it.description() - ('@'+it.type().typeName())) : it.description()}.join(sepChar) + sepChar : ''
>     t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + linkable(it.type().typeName()) : it.description()}.join(sepChar) + sepChar : ''
> }
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)