Improve javadoc tool handling of streams.

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 19
    • Affects Version/s: 18
    • Component/s: tools

      JDK-8268774 is a minimal fix to ensure that logging messages generate by the tool are written to stderr, not stdout.

      The fix could be cleaned up.

      Suggestions:
      * avoid direct use of `JavadocLog.printRawLines` (make the method private?)
      * flatten the ToolEnvironment.notice methods down into `JavadocLog`
      * change the use of `notice` methods in Start/etc so that the command-line help is written directly to the std-out stream ... i.e. not via `notice`
      * establish a documented convention that error/warning/notice methods all go to the diagnostic writer

      Separately, Messages:176 looks questionable for not handling embedded newlines. Right now, it may be OK, because the
      current usage does not include embedded newlines,

                  reporter.getDiagnosticWriter().println(resources.getText(key, args));

            Assignee:
            Jonathan Gibbons
            Reporter:
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: