src/java.base/share/classes/sun/net/www/ParseUtil.java
changeset 53018 8bf9268df0e2
parent 48897 3f19b5965355
child 54688 96ad739cfc39
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   534     //
   534     //
   535     private static void checkPath(String s, String scheme, String path)
   535     private static void checkPath(String s, String scheme, String path)
   536         throws URISyntaxException
   536         throws URISyntaxException
   537     {
   537     {
   538         if (scheme != null) {
   538         if (scheme != null) {
   539             if ((path != null)
   539             if (path != null && !path.isEmpty() && path.charAt(0) != '/')
   540                 && ((path.length() > 0) && (path.charAt(0) != '/')))
       
   541                 throw new URISyntaxException(s,
   540                 throw new URISyntaxException(s,
   542                                              "Relative path in absolute URI");
   541                                              "Relative path in absolute URI");
   543         }
   542         }
   544     }
   543     }
   545 
   544