If the diagnostic listener is null for a call of JavaCompiler.getStandardFileManager, any messages go to System.err.
If the diagnostic listener is null for a subsequent call of JavaCompiler.getTask, any messages go to the stream given to the getTask call.
This asymmetry is inconvenient.
If the diagnostic listener is null for a subsequent call of JavaCompiler.getTask, any messages go to the stream given to the getTask call.
This asymmetry is inconvenient.