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

The fix operation deletes generic functions's generic-class javadoc if exist, and add it if lack, and will not create it if param part of javadoc be empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • fix
    • None

    Description

      fixed in https://github.com/apache/maven-javadoc-plugin/pull/55

      original function:

          public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
              return;
          }
      

      after running "fix", we get:

          /**
           * <p>testGeneric.</p>
           *
           * @param tClass a {@link java.lang.Class} object.
           * @param o a {@link java.lang.Object} object.
           * @param <T> a T object.
           */
          public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
              return;
          }
      

      after running "fix" another time, we get:

          /**
           * <p>testGeneric.</p>
           *
           * @param tClass a {@link java.lang.Class} object.
           * @param o a {@link java.lang.Object} object.
           */
          public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
              return;
          }
      

      after running "fix" the third time, we get:

          /**
           * <p>testGeneric.</p>
           *
           * @param tClass a {@link java.lang.Class} object.
           * @param o a {@link java.lang.Object} object.
           * @param <T> a T object.
           */
          public <T extends Object> void testGeneric(Class<T> tClass, Object o) {
              return;
          }
      

      again.

      and if we run fix for another time, it will continue the loop.

      so do we really need

      @param <T> a T object.

      ?

      If not, then it is wrongly added.
      If so, then it is wrongly deleted.
      Be a bug either way.

      Attachments

        Issue Links

          Activity

            People

              elharo Elliotte Rusty Harold
              XenoAmess Jin Xu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: