You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/03/14 09:30:07 UTC

[GitHub] [commons-release-plugin] arturobernalg commented on a change in pull request #44: Replace construction of FileInputStream and FileOutputStream objects with Files NIO APIs.

arturobernalg commented on a change in pull request #44:
URL: https://github.com/apache/commons-release-plugin/pull/44#discussion_r593870601



##########
File path: src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java
##########
@@ -147,8 +148,9 @@ private void getAllSiteFiles(final File siteDirectory, final List<File> filesToC
      */
     private void writeZipFile(final File outputDirectory, final File directoryToZip, final List<File> fileList)
             throws IOException {
-        try (FileOutputStream fos = new FileOutputStream(outputDirectory.getAbsolutePath() + "/site.zip");
-                ZipOutputStream zos = new ZipOutputStream(fos)) {
+        try (OutputStream fos = Files.newOutputStream(new File(outputDirectory.getAbsolutePath() + "/site.zip")
+                .toPath());
+             ZipOutputStream zos = new ZipOutputStream(fos)) {

Review comment:
       Hi @kinow 
   I have check the code directly and i can't see the extra space. I also run the checkstyle and nothing :-(
   Regards,




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