maven-surefire-common/src/main/java/org/apache/maven/surefire/stream/EventDecoder.java [411:432]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (sink == null) {
            return null;
        }

        try {
            OutputStream fos = new FileOutputStream(sink, true);
            final OutputStream os = new BufferedOutputStream(fos, DEBUG_SINK_BUFFER_SIZE);
            addShutDownHook(new Thread(new FutureTask<>(() -> {
                os.close();
                return null;
            })));
            return os;
        } catch (FileNotFoundException e) {
            return null;
        }
    }

    @Override
    public void close() throws IOException {
        // do NOT close the channel, it's std/out.
        if (debugSink != null) {
            debugSink.close();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



surefire-booter/src/main/java/org/apache/maven/surefire/booter/stream/CommandDecoder.java [195:215]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (sink == null) {
            return null;
        }

        try {
            OutputStream fos = new FileOutputStream(sink, true);
            final OutputStream os = new BufferedOutputStream(fos, DEBUG_SINK_BUFFER_SIZE);
            addShutDownHook(new Thread(new FutureTask<>(() -> {
                os.close();
                return null;
            })));
            return os;
        } catch (FileNotFoundException e) {
            return null;
        }
    }

    @Override
    public void close() throws IOException {
        if (debugSink != null) {
            debugSink.close();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



