[ https://issues.apache.org/jira/browse/GROOVY-9546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17104013#comment-17104013 ]
Mikko Värri commented on GROOVY-9546: ------------------------------------- For Java source code, the annotations are rendered something like this: {{@com.github.javaparser.ast.expr.MarkerAnnotationExprDeprecated}} {{@com.github.javaparser.ast.expr.SingleMemberAnnotationExprSuppressWarnings}} {{public class J3}} I don't thing dropping the "it.description()" altogether is the right fix. The documentation is supposed to show the annotation parameters, too, and I assume description() is supposed to be that. > 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 > Priority: Minor > 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} > 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)