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.
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.