You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2023/07/10 17:53:54 UTC

[GitHub] [netbeans] mbien commented on pull request #6172: close streams

mbien commented on PR #6172:
URL: https://github.com/apache/netbeans/pull/6172#issuecomment-1629439950

   the `copy` method isn't used anywhere and can be removed. The `readFromFile` method however is used from some tests and can be simplified. The result would look like:
   
   ```java
   package org.netbeans.qa.form;
   
   import java.io.IOException;
   import java.nio.file.Files;
   import java.nio.file.Paths;
   
   public class VisualDevelopmentUtil {
       public static String JAVA_VERSION = System.getProperty("java.version");
       
       public static String readFromFile(String filename) throws IOException   {
           return new String(Files.readAllBytes(Paths.get(filename)));
       }
   }
   ```
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists