Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-32985

Cleaning empty Javadoc comments should be done by a JavadocFormatter option other than --update

    Details

      Description

      The --update option of the Javadoc formatter properly inserts missing tags; but it also removes empty tags (tags without any comments) from methods, going outside of what would normally be deemed "update" behaviour. Cleaning out Javadoc that is completely empty is a good thing but should be triggered by an option other than --update.

      Cleaning out empty Javadoc should be done by an option --clean ...
      ant format-javadoc -Dclean=true

      Test case 1:
      1. Insert empty Javadoc for a method in an arbitrary class

      example
      /**
      *

      • @param paramName
      • @throws ExceptionClassName
      • @returns
        */
        public SomeObject someMethod(ParamType paramName) {...}

        2. Run ant format-javadoc -Dlimit=SomeClassName -Dupdate=true
        3. The empty Javadoc should remain untouched


        Test case 2:
        1. Insert empty Javadoc for a method in an arbitrary class (see step 1 of test case 1)
        2. Run ant format-javadoc -Dlimit=SomeClassName -Dclean=true
        3. The empty Javadoc should be removed completely from that method leaving just the method itself ...

        public SomeObject someMethod(ParamType paramName) {...}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cody.hoag Cody Hoag
              Reporter:
              james.hinkey James Hinkey
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 47 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.0 CE M4