You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/04 23:04:48 UTC

[GitHub] [maven] adufourcq commented on pull request #589: [MNG-7304] - Use try-with-resources Statement

adufourcq commented on pull request #589:
URL: https://github.com/apache/maven/pull/589#issuecomment-1005236082


   The failing test is mng3183. this test tests logging into a text file. Test fails because the log file is empty.
   
   The log file is empty because of the use of try-with-resources in the MavenCli class.
   The behavior of try-with-resources implies that the open resource(s) are closed when the statement is closed. In the code, the PrintStream is therefore closed at the end of the try block, which prevents writing to the file afterwards.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org