< prev index next >

src/java.base/windows/classes/sun/net/www/protocol/file/Handler.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

@@ -81,11 +81,11 @@
 
         path = ParseUtil.decode(file);
         path = path.replace('/', '\\');
         path = path.replace('|', ':');
 
-        if ((host == null) || host.equals("") ||
+        if ((host == null) || host.isEmpty() ||
                 host.equalsIgnoreCase("localhost") ||
                 host.equals("~")) {
            return createFileURLConnection(url, new File(path));
         }
 
< prev index next >