psiroky commented on code in PR #223:
URL: 
https://github.com/apache/maven-integration-testing/pull/223#discussion_r1060978463


##########
core-it-support/core-it-plugins/maven-it-plugin-settings/src/main/java/org/apache/maven/plugin/coreit/SettingsReadItMojo.java:
##########
@@ -59,22 +58,14 @@ public void execute()
             dumpFile.delete();
         }
         dumpFile.getParentFile().mkdirs();
-        FileWriter fw = null;
-        try
+        try ( FileWriter fw = new FileWriter( dumpFile ) )
         {
-            fw = new FileWriter( dumpFile );
             SettingsXpp3Writer writer = new SettingsXpp3Writer();
             writer.write( fw, settings );
         }
         catch ( IOException e )
         {
             throw new MojoExecutionException( e.getMessage(), e );
         }
-        finally
-        {
-            IOUtil.close( fw );
-        }
     }

Review Comment:
   These simple changes are to avoid the direct dependency on plexus-utils in 
this plugin (as it is brought in by one the maven deps, which are now in 
provided scope - and thus pluxus-utils ends up in provided scope as well.)



-- 
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: issues-unsubscr...@maven.apache.org

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

Reply via email to