ebarboni commented on code in PR #153:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/153#discussion_r1511059790


##########
nb-repository-plugin/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java:
##########
@@ -1105,17 +1104,24 @@ else if ( wr instanceof ModuleWrapperMaven )
 //        mavenModel.setBuild(build);
 
         File fil = null;
-        try ( FileWriter writer = new FileWriter( fil ) )
+        try 
         {
-            MavenXpp3Writer xpp = new MavenXpp3Writer();
-            fil = Files.createTempFile( "maven", ".pom" ).toFile();
+            fil = Files.createTempFile("maven", ".pom").toFile();
             fil.deleteOnExit();
-            xpp.write( writer, mavenModel );
-        }
-        catch ( IOException ex )
+        } catch (IOException ex) 
         {
             ex.printStackTrace();
-        }        
+        }
+        if (fil != null) {

Review Comment:
   for me better but nested are often discouraged



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