mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8286378: Address possibly lossy conversions in java.base
Reviewed-by: naoto, xuelei, bpb, alanb
This commit is contained in:
parent
0a6832b24c
commit
17c52789b7
32 changed files with 68 additions and 71 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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
|
||||
|
@ -190,12 +190,12 @@ public final class ZoneInfoFile {
|
|||
|
||||
char[] buf = new char[] { 'G', 'M', 'T', sign, '0', '0', ':', '0', '0' };
|
||||
if (hh >= 10) {
|
||||
buf[4] += hh / 10;
|
||||
buf[4] += (char)(hh / 10);
|
||||
}
|
||||
buf[5] += hh % 10;
|
||||
buf[5] += (char)(hh % 10);
|
||||
if (mm != 0) {
|
||||
buf[7] += mm / 10;
|
||||
buf[8] += mm % 10;
|
||||
buf[7] += (char)(mm / 10);
|
||||
buf[8] += (char)(mm % 10);
|
||||
}
|
||||
return new String(buf);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue