mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8294378: URLPermission constructor exception when using tr locale
Reviewed-by: dfuchs, jpai, aefimov
This commit is contained in:
parent
34a499de8e
commit
ff2c987669
3 changed files with 13 additions and 5 deletions
|
@ -149,6 +149,9 @@ class HostPortrange {
|
|||
// regular domain name
|
||||
hoststr = toLowerCase(hoststr);
|
||||
}
|
||||
} else {
|
||||
// regular domain name
|
||||
hoststr = toLowerCase(hoststr);
|
||||
}
|
||||
}
|
||||
hostname = hoststr;
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.util.List;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.security.Permission;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Represents permission to access a resource or set of resources defined by a
|
||||
|
@ -471,7 +472,7 @@ public final class URLPermission extends Permission {
|
|||
throw new IllegalArgumentException(
|
||||
"Invalid URL string: \"" + url + "\"");
|
||||
}
|
||||
scheme = url.substring(0, delim).toLowerCase();
|
||||
scheme = url.substring(0, delim).toLowerCase(Locale.ROOT);
|
||||
this.ssp = url.substring(delim + 1);
|
||||
|
||||
if (!ssp.startsWith("//")) {
|
||||
|
@ -493,7 +494,7 @@ public final class URLPermission extends Permission {
|
|||
auth = authpath.substring(0, delim);
|
||||
this.path = authpath.substring(delim);
|
||||
}
|
||||
this.authority = new Authority(scheme, auth.toLowerCase());
|
||||
this.authority = new Authority(scheme, auth);
|
||||
}
|
||||
|
||||
private String actions() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue