Damir Murat created GROOVY-9546:
-----------------------------------
Summary: 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
Attachments: image-2020-05-10-17-42-34-810.png,
image-2020-05-10-17-47-00-858.png
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}
*no* further _formatting_ is done here
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)