mirror of
https://github.com/google/nomulus.git
synced 2025-05-18 02:09:35 +02:00
Replace to(Upper|Lower)Case with Ascii.to$1Case
The presubmits are warning that toUpperCase() and toLowerCase() are locale-specific, and advise using Ascii.toUpperCase() and Ascii.toLowerCase() as a local-invariant alternative. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127583677
This commit is contained in:
parent
d9596fa30c
commit
e72491e59b
22 changed files with 62 additions and 38 deletions
|
@ -38,6 +38,7 @@ import com.google.appengine.api.urlfetch.URLFetchService;
|
|||
import com.google.appengine.tools.cloudstorage.GcsFilename;
|
||||
import com.google.appengine.tools.cloudstorage.GcsService;
|
||||
import com.google.appengine.tools.cloudstorage.GcsServiceFactory;
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.io.ByteSource;
|
||||
import google.registry.config.RegistryConfig;
|
||||
|
@ -194,7 +195,7 @@ public class RdeReportActionTest {
|
|||
private static ImmutableMap<String, String> mapifyHeaders(Iterable<HTTPHeader> headers) {
|
||||
ImmutableMap.Builder<String, String> builder = new ImmutableMap.Builder<>();
|
||||
for (HTTPHeader header : headers) {
|
||||
builder.put(header.getName().replace('-', '_').toUpperCase(), header.getValue());
|
||||
builder.put(Ascii.toUpperCase(header.getName().replace('-', '_')), header.getValue());
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue