src/java.base/windows/classes/sun/nio/fs/WindowsUriSupport.java
changeset 52902 e3398b2e1ab0
parent 47216 71c04702a3d5
equal deleted inserted replaced
52901:3ba9ff4d4aaf 52902:e3398b2e1ab0
   126         if (uri.getRawFragment() != null)
   126         if (uri.getRawFragment() != null)
   127             throw new IllegalArgumentException("URI has a fragment component");
   127             throw new IllegalArgumentException("URI has a fragment component");
   128         if (uri.getRawQuery() != null)
   128         if (uri.getRawQuery() != null)
   129             throw new IllegalArgumentException("URI has a query component");
   129             throw new IllegalArgumentException("URI has a query component");
   130         String path = uri.getPath();
   130         String path = uri.getPath();
   131         if (path.equals(""))
   131         if (path.isEmpty())
   132             throw new IllegalArgumentException("URI path component is empty");
   132             throw new IllegalArgumentException("URI path component is empty");
   133 
   133 
   134         // UNC
   134         // UNC
   135         String auth = uri.getRawAuthority();
   135         String auth = uri.getRawAuthority();
   136         if (auth != null && !auth.equals("")) {
   136         if (auth != null && !auth.isEmpty()) {
   137             String host = uri.getHost();
   137             String host = uri.getHost();
   138             if (host == null)
   138             if (host == null)
   139                 throw new IllegalArgumentException("URI authority component has undefined host");
   139                 throw new IllegalArgumentException("URI authority component has undefined host");
   140             if (uri.getUserInfo() != null)
   140             if (uri.getUserInfo() != null)
   141                 throw new IllegalArgumentException("URI authority component has user-info");
   141                 throw new IllegalArgumentException("URI authority component has user-info");