Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8038730

Clean up the way JavadocTester is invoked, and checks for errors.

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b14
    • Verification:
      Verified

      Description

      There are two static methods JavadocTester.run which take a JavadocTester as the first argument. These should be converted to non-static methods and all the tests updated.

      In general, the tests ignore the return code from javadoc, which is bad.

      We should re-evaluate the way we invoke JavadocTester. It may be that a builder pattern would work better than the current splattering of run* methods.

        Activity

        Hide
        jjg Jonathan Gibbons added a comment - - edited
        If we used a builder pattern, we should also allow checking of the javadoc exit code

        Note: only 4 out of over 200 tests check the javadoc exit code:

        $ find test/com/sun/javadoc -name \*.java | xargs -n 1 grep --files-with-matches checkExitCode
        test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java
        test/com/sun/javadoc/testXOption/TestXOption.java
        test/com/sun/javadoc/_template/TemplateComplete.java
        test/com/sun/javadoc/testDocErrorReporter/TestDocErrorReporter.java
        test/com/sun/javadoc/testHelpOption/TestHelpOption.java
        test/com/sun/javadoc/lib/JavadocTester.java
        Show
        jjg Jonathan Gibbons added a comment - - edited If we used a builder pattern, we should also allow checking of the javadoc exit code Note: only 4 out of over 200 tests check the javadoc exit code: $ find test/com/sun/javadoc -name \*.java | xargs -n 1 grep --files-with-matches checkExitCode test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java test/com/sun/javadoc/testXOption/TestXOption.java test/com/sun/javadoc/_template/TemplateComplete.java test/com/sun/javadoc/testDocErrorReporter/TestDocErrorReporter.java test/com/sun/javadoc/testHelpOption/TestHelpOption.java test/com/sun/javadoc/lib/JavadocTester.java
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/94aca852a4d0
        User: jjg
        Date: 2014-05-09 22:37:34 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/94aca852a4d0 User: jjg Date: 2014-05-09 22:37:34 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/94aca852a4d0
        User: lana
        Date: 2014-05-21 18:41:40 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/94aca852a4d0 User: lana Date: 2014-05-21 18:41:40 +0000
        Hide
        lshikhva Ludmila Shikhvarg added a comment -
        ManualVerify: Bug verified manually in promoted results for build JDK9-b14
        Show
        lshikhva Ludmila Shikhvarg added a comment - ManualVerify: Bug verified manually in promoted results for build JDK9-b14

          People

          • Assignee:
            jjg Jonathan Gibbons
            Reporter:
            jjg Jonathan Gibbons
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: