Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9546

Annotations on class signature are rendered incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.3
    • 4.0.0-alpha-1, 3.0.4
    • GroovyDoc
    • None

    Description

      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:

      After some debugging, I managed to fix the issue by modifying

      org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html.annotations()

      like this:

      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 : ''
      }
      

       

      Attachments

        1. image-2020-05-10-17-47-00-858.png
          30 kB
          Damir Murat
        2. image-2020-05-10-17-42-34-810.png
          56 kB
          Damir Murat

        Activity

          People

            paulk Paul King
            dmurat Damir Murat
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m