[ https://issues.apache.org/jira/browse/MNG-7302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558896#comment-17558896 ]
ASF GitHub Bot commented on MNG-7302: ------------------------------------- slachiewicz commented on code in PR #587: URL: https://github.com/apache/maven/pull/587#discussion_r906832179 ########## 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: IntelliJ suggests with comment: _The streams created using Files methods are usually more efficient than those created by stream constructors._ > 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.7#820007)