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

Add -Werror option to javadoc

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 15
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Adding a new command-line option
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      Add an option for the javadoc tool to report an error if warnings occur.

      Problem

      Many users want to keep their code free of any warnings that may have been enabled, by having a build fail when warnings have occurred.

      Solution

      Provide a new option -Werror with similar functionality to the equivalent option in javac.

      As with javac, warnings are treated as if they are errors, and a single explicit error message will be reported if any number of warnings occur.

      The javadoc tool does currently have an undocumented option -Xwerror with similar but not identical functionality. This option will be folded into the new -Werror option and eventually removed in a later release.

      Although the proposed name does not follow the naming guidelines in JEP 293, there is enough precedent to justify the continued use of the proposed name.

      Specification

      -Werror: treat warnings as if they were errors

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                jjg Jonathan Gibbons
                Reviewed By:
                Hannes Wallnoefer, Pavel Rappo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: