Github user ChristianSchulte commented on a diff in the pull request:
https://github.com/apache/maven-surefire/pull/144#discussion_r103110034
--- Diff:
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java
---
@@ -69,8 +69,8 @@ public void close()
{
try
{
- fileOutputStream.flush();
- fileOutputStream.close();
+ // fileOutputStream.flush(); Will not call close on
exception!
+ fileOutputStream.close(); // Will implicitly flush.
--- End diff --
I just wanted to be sure that `close` is always called. See the comment.
When `flush` throws an exception, `close` will never be called and leak
resources.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]