mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8294626: Improve URL protocol lower casing
Reviewed-by: dfuchs
This commit is contained in:
parent
052a924985
commit
3efbd5f0fa
3 changed files with 22 additions and 11 deletions
|
@ -1092,7 +1092,7 @@ public abstract class URLConnection {
|
|||
* @since 9
|
||||
*/
|
||||
public static void setDefaultUseCaches(String protocol, boolean defaultVal) {
|
||||
protocol = protocol.toLowerCase(Locale.US);
|
||||
protocol = URL.lowerCaseProtocol(protocol);
|
||||
defaultCaching.put(protocol, defaultVal);
|
||||
}
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ public abstract class URLConnection {
|
|||
* @since 9
|
||||
*/
|
||||
public static boolean getDefaultUseCaches(String protocol) {
|
||||
Boolean protoDefault = defaultCaching.get(protocol.toLowerCase(Locale.US));
|
||||
Boolean protoDefault = defaultCaching.get(URL.lowerCaseProtocol(protocol));
|
||||
if (protoDefault != null) {
|
||||
return protoDefault.booleanValue();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue