mbien commented on code in PR #149:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/149#discussion_r1497164003


##########
nbm-maven-plugin/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java:
##########
@@ -925,24 +913,15 @@ else if ( !name.contains( "." ) || name.endsWith( ".sh" ) 
)
     private void writeFile( String path, File destSh )
             throws IOException
     {
-        InputStream instream = null;
-        OutputStream output = null;
-        try
+        try (InputStream instream = 
getClass().getClassLoader().getResourceAsStream( path ); OutputStream output = 
new BufferedOutputStream( new FileOutputStream( destSh ) ))

Review Comment:
   split in two lines maybe?
   
   ```java
          try (InputStream instream = 
getClass().getClassLoader().getResourceAsStream(path);
               OutputStream output = new BufferedOutputStream(new 
FileOutputStream(destSh))) {
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to