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 2020/05/30 12:07:36 UTC

[GitHub] [maven-shared-utils] elharo commented on a change in pull request #46: [MSHARED-860] suppress deprecations and clean up test methods

elharo commented on a change in pull request #46:
URL: https://github.com/apache/maven-shared-utils/pull/46#discussion_r432836276



##########
File path: src/test/java/org/apache/maven/shared/utils/testhelpers/FileTestHelper.java
##########
@@ -70,11 +74,12 @@ public static void createLineBasedFile( File file, String[] data )
             throw new IOException( "Cannot create file " + file + " as the parent directory does not exist" );
         }
 
-        try ( PrintWriter out = new PrintWriter( new OutputStreamWriter( new FileOutputStream( file ), "UTF-8" ) ) )
+        try ( Writer out = new OutputStreamWriter( new FileOutputStream( file ), "UTF-8" ) )
         {
             for ( String aData : data )
             {
-                out.println( aData );
+                out.write( aData );
+                out.write( System.getProperty( "line.separator" ) );

Review comment:
       done




----------------------------------------------------------------
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.

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