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

Add -Werror option to javadoc

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 15
    • tools
    • None
    • behavioral
    • minimal
    • Adding a new command-line option
    • add/remove/modify command line option
    • JDK

      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

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Hannes Wallnoefer, Pavel Rappo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: