[ 
https://issues.apache.org/jira/browse/MNG-7302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731762#comment-17731762
 ] 

ASF GitHub Bot commented on MNG-7302:
-------------------------------------

gnodet commented on code in PR #587:
URL: https://github.com/apache/maven/pull/587#discussion_r1227179496


##########
maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java:
##########
@@ -271,7 +271,7 @@ protected void createArtifact( Artifact artifact, 
ArtifactRepository repository
         {
             artifactFile.getParentFile().mkdirs();
         }
-        try ( Writer writer = new OutputStreamWriter( new FileOutputStream( 
artifactFile ), StandardCharsets.ISO_8859_1) )
+        try ( Writer writer = new OutputStreamWriter( Files.newOutputStream( 
artifactFile.toPath() ), StandardCharsets.ISO_8859_1) )

Review Comment:
   This should use `Files.newBufferedWriter` instead imho





> Replace construction of FileInputStream and FileOutputStream objects with 
> Files NIO APIs.
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-7302
>                 URL: https://issues.apache.org/jira/browse/MNG-7302
>             Project: Maven
>          Issue Type: Sub-task
>            Reporter: Arturo Bernal
>            Priority: Minor
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to