Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-351

Javadoc:fix fixTags parameter doesn't support 'return' value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7, 2.8, 2.8.1
    • 2.10
    • None
    • None
    • Patch

    Description

      Javadoc:fix fixTags parameter doesn't support 'return' value

      According to the docs (http://maven.apache.org/plugins/maven-javadoc-plugin/fix-mojo.html#fixTags) the fixTags parameter should be able to handle the following values:

      1. all (fix all Javadoc tags)
      2. author (fix only @author tag)
      3. version (fix only @version tag)
      4. since (fix only @since tag)
      5. param (fix only @param tag)
      6. return (fix only @return tag)
      7. throws (fix only @throws tag)
      8. link (fix only @link tag)

      When Calling javadoc:fix version 2.8 or 2.7 with -DfixTags=return gives the following error:

      Unrecognized 'return' for fixTags parameter. Ignored it!
      

      Using 2.6 this works just fine. When looking at the following diff:

      --- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java	2011/04/25 13:38:09	1096478
      +++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java	2011/04/30 18:59:02	1098139
      @@ -491,10 +491,8 @@
                   for ( int j = 0; j < split.length; j++ )
                   {
                       String s = split[j].trim();
      -                if ( FIX_TAGS_ALL.equalsIgnoreCase( s.trim() ) || AUTHOR_TAG.equalsIgnoreCase( s.trim() )
      -                    || VERSION_TAG.equalsIgnoreCase( s.trim() ) || SINCE_TAG.equalsIgnoreCase( s.trim() )
      -                    || PARAM_TAG.equalsIgnoreCase( s.trim() ) || RETURN_TAG.equalsIgnoreCase( s.trim() )
      -                    || THROWS_TAG.equalsIgnoreCase( s.trim() ) )
      +                if ( JavadocUtil.equalsIgnoreCase( s, FIX_TAGS_ALL, AUTHOR_TAG, VERSION_TAG, SINCE_TAG, PARAM_TAG,
      +                                                   THROWS_TAG ) )
                       {
                           filtered.add( s );
                       }
      

      the functionality seems to be broken since revision 1098139. I added a patch which restores the functionality.

      Attachments

        1. fixTags.patch
          3 kB
          Lars van der Vliet

        Activity

          People

            aheritier Arnaud Heritier
            larsvliet Lars van der Vliet
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: