< prev index next >

src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java

Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb

@@ -139,18 +139,12 @@
         return result;
     }
 
     static boolean isFastFileTransferRequested() {
         String fileTransferProp = GetPropertyAction
-                .privilegedGetProperty("jdk.nio.enableFastFileTransfer");
-        boolean enable;
-        if ("".equals(fileTransferProp)) {
-            enable = true;
-        } else {
-            enable = Boolean.parseBoolean(fileTransferProp);
-        }
-        return enable;
+                .privilegedGetProperty("jdk.nio.enableFastFileTransfer", "false");
+        return fileTransferProp.isEmpty() ? true : Boolean.parseBoolean(fileTransferProp);
     }
 
     static {
         IOUtil.load();
         fastFileTransfer = isFastFileTransferRequested();
< prev index next >