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

Enhance JavacTool.getTask for flexibility

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      The public method JavacTool.getTask calls onto a similar private method that allows a Context to be specified. With that in mind, look at these lines

                  if (out == null)
                      context.put(Log.errKey, new PrintWriter(System.err, true));
                  else
                      context.put(Log.errKey, new PrintWriter(out, true));

      1. If out is null, it should not overwrite the value in the context if that value is already set.

      2. If out is non-null, and is a PrintWriter, it should not be rewrapped in another PrintWriter.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gli Guoxiong Li
              Reporter:
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: