mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base
Reviewed-by: naoto
This commit is contained in:
parent
13f6450e2e
commit
b32d6411c4
11 changed files with 44 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -27,6 +27,8 @@ package java.net;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
/**
|
||||
|
@ -210,7 +212,7 @@ public abstract class ProxySelector {
|
|||
|
||||
@Override
|
||||
public synchronized List<Proxy> select(URI uri) {
|
||||
String scheme = uri.getScheme().toLowerCase();
|
||||
String scheme = uri.getScheme().toLowerCase(Locale.ROOT);
|
||||
if (scheme.equals("http") || scheme.equals("https")) {
|
||||
return list;
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -817,7 +817,7 @@ public class KeyStore {
|
|||
this.type = type;
|
||||
|
||||
if (!skipDebug && pdebug != null) {
|
||||
pdebug.println("KeyStore." + type.toUpperCase() + " type from: " +
|
||||
pdebug.println("KeyStore." + type.toUpperCase(Locale.ROOT) + " type from: " +
|
||||
getProviderName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4725,7 +4725,7 @@ public final class DateTimeFormatterBuilder {
|
|||
* @return the position after the parse
|
||||
*/
|
||||
private int parseOffsetBased(DateTimeParseContext context, CharSequence text, int prefixPos, int position, OffsetIdPrinterParser parser) {
|
||||
String prefix = text.subSequence(prefixPos, position).toString().toUpperCase();
|
||||
String prefix = text.subSequence(prefixPos, position).toString().toUpperCase(Locale.ROOT);
|
||||
if (position >= text.length()) {
|
||||
context.setParsed(ZoneId.of(prefix));
|
||||
return position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue