< prev index next >

src/java.base/share/classes/sun/net/www/ParseUtil.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

*** 534,545 **** // private static void checkPath(String s, String scheme, String path) throws URISyntaxException { if (scheme != null) { ! if ((path != null) ! && ((path.length() > 0) && (path.charAt(0) != '/'))) throw new URISyntaxException(s, "Relative path in absolute URI"); } } --- 534,544 ---- // private static void checkPath(String s, String scheme, String path) throws URISyntaxException { if (scheme != null) { ! if (path != null && !path.isEmpty() && path.charAt(0) != '/') throw new URISyntaxException(s, "Relative path in absolute URI"); } }
< prev index next >