8286378: Address possibly lossy conversions in java.base

Reviewed-by: naoto, xuelei, bpb, alanb
This commit is contained in:
Roger Riggs 2022-05-12 16:50:36 +00:00
parent 0a6832b24c
commit 17c52789b7
32 changed files with 68 additions and 71 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, 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
@ -418,7 +418,7 @@ public final class URLPermission extends Permission {
"White space not allowed in methods: \"" + methods + "\"");
} else {
if (c >= 'a' && c <= 'z') {
c += 'A' - 'a';
c += (char) ('A' - 'a');
}
b.append(c);
}
@ -437,7 +437,7 @@ public final class URLPermission extends Permission {
char c = headers.charAt(i);
if (c >= 'a' && c <= 'z') {
if (capitalizeNext) {
c += 'A' - 'a';
c += (char) ('A' - 'a');
capitalizeNext = false;
}
b.append(c);