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

Enhance JavacTool.getTask for flexibility

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 17
    • None
    • tools
    • None
    • b21

      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.

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

              Created:
              Updated:
              Resolved: