Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      2

      Description

      The Javadoc formatter is throwing a NullPointerException when run with the init option.

      Steps:
      1. ant compile compile-test
      2. ant format-javadoc -Dlimit=ResourceLocalServiceImpl -Dinit=true

      Results in:
      ...
      [java] java.lang.NullPointerException
      [java] at com.liferay.portal.tools.JavadocFormatter._wrapText(JavadocFormatter.java:1563)
      [java] at com.liferay.portal.tools.JavadocFormatter._getJavaClassComment(JavadocFormatter.java:883)
      [java] at com.liferay.portal.tools.JavadocFormatter._updateJavaFromDocument(JavadocFormatter.java:1467)
      [java] at com.liferay.portal.tools.JavadocFormatter._format(JavadocFormatter.java:695)
      [java] at com.liferay.portal.tools.JavadocFormatter.<init>(JavadocFormatter.java:162)
      [java] at com.liferay.portal.tools.JavadocFormatter.main(JavadocFormatter.java:70)

        Issue Links

          Activity

          Hide
          james.hinkey James Hinkey added a comment -

          Corrected faulty logic that was attempting wrapping text comments, even if a comment String was null.

          All comments should be should be wrapped to 80 columns if they are non-null, regardless of whether init is flagged.

          Tests run...

          Test1:
          1. ant compile compile-test
          2. ant format-javadoc -Dlimit=ResourceLocalServiceImpl
          Results:
          Javadoc comments were initialized.
          For example,
          /**
          *

          • @param
          • @param
          • @param
          • @param
          • @param
          • @param
          • @param
          • @throws
          • @throws
            */
            public void addModelResources(...)

          Note, the update mode was unaffected continuing to work appropriately.

          Show
          james.hinkey James Hinkey added a comment - Corrected faulty logic that was attempting wrapping text comments, even if a comment String was null. All comments should be should be wrapped to 80 columns if they are non-null, regardless of whether init is flagged. Tests run... Test1: 1. ant compile compile-test 2. ant format-javadoc -Dlimit=ResourceLocalServiceImpl Results: Javadoc comments were initialized. For example, /** * @param @param @param @param @param @param @param @throws @throws */ public void addModelResources(...) Note, the update mode was unaffected continuing to work appropriately.
          Hide
          michael.saechang Michael Saechang added a comment -

          Thanks for the testing steps James!

          Show
          michael.saechang Michael Saechang added a comment - Thanks for the testing steps James!
          Hide
          he.song Serena Song (Inactive) added a comment -

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 7562514316d904255b6eb95929c076efca2e58c8.

          Javadoc formatter init crashes with null pointer.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 5deda67a59216847b4107af178e2b489d3247bd7.
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 8b3d3bc1f59cd7a6efcedc8ac83a779c54b2e211.

          No java.lang.NullPointerException displays and build javadoc format successfully.

          Show
          he.song Serena Song (Inactive) added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 7562514316d904255b6eb95929c076efca2e58c8. Javadoc formatter init crashes with null pointer. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 5deda67a59216847b4107af178e2b489d3247bd7. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 8b3d3bc1f59cd7a6efcedc8ac83a779c54b2e211. No java.lang.NullPointerException displays and build javadoc format successfully.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 11 weeks, 4 days ago

                Development

                  Subcomponents