maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ChristianSchulte <>
Subject [GitHub] maven-surefire pull request #144: Resource leaks.
Date Sun, 26 Feb 2017 17:08:49 GMT
Github user ChristianSchulte commented on a diff in the pull request:
    --- Diff: surefire-booter/src/main/java/org/apache/maven/surefire/booter/
    @@ -236,13 +236,17 @@ private static void exit( int returnCode, Shutdown shutdownType,
CommandReader r
             switch ( shutdownType )
                 case KILL:
    +                System.out.close();
    --- End diff --
    `` and `System.out` are both [`PrintStream`](
That class already is error prone like mad (autoFlush yes or no, checkError instead of throwing
exceptions, etc.). It internally creates a `BufferedWriter` used for writing characters. I
haven't found anything in the JDK flushing those buffers so it seems this is up to the application.
I am quite sure that closing those streams manually is correct. That's what you would do in
a C application as well.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message