8145988: Use the raw methods of java.net.URI when possible

Reviewed-by: shade, chegar
This commit is contained in:
Claes Redestad 2015-12-22 16:42:16 +01:00
parent 7e4d56677d
commit 22df7c453f
5 changed files with 21 additions and 19 deletions

View file

@ -49,11 +49,11 @@ class UnixUriUtils {
String scheme = uri.getScheme();
if ((scheme == null) || !scheme.equalsIgnoreCase("file"))
throw new IllegalArgumentException("URI scheme is not \"file\"");
if (uri.getAuthority() != null)
if (uri.getRawAuthority() != null)
throw new IllegalArgumentException("URI has an authority component");
if (uri.getFragment() != null)
if (uri.getRawFragment() != null)
throw new IllegalArgumentException("URI has a fragment component");
if (uri.getQuery() != null)
if (uri.getRawQuery() != null)
throw new IllegalArgumentException("URI has a query component");
// compatibility with java.io.File