changeset 57310:88799f0b0f82

8235601: redundant code in IOUtils.java Reviewed-by: prr, asemenyuk, almatvee
author herrick
date Tue, 10 Dec 2019 08:11:27 -0500
parents de30eb1867e3
children d1688b8d1516
files src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java	Tue Dec 10 13:39:38 2019 +0100
+++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java	Tue Dec 10 08:11:27 2019 -0500
@@ -121,10 +121,7 @@
         try (FileChannel source = new FileInputStream(sourceFile).getChannel();
             FileChannel destination =
                     new FileOutputStream(destFile).getChannel()) {
-
-            if (destination != null && source != null) {
-                destination.transferFrom(source, 0, source.size());
-            }
+            destination.transferFrom(source, 0, source.size());
         }
 
         //preserve executable bit!