mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -2323,11 +2323,11 @@ public class GregorianCalendar extends Calendar {
|
|||
fixedDate += time / ONE_DAY;
|
||||
timeOfDay += (int) (time % ONE_DAY);
|
||||
if (timeOfDay >= ONE_DAY) {
|
||||
timeOfDay -= ONE_DAY;
|
||||
timeOfDay -= (int)ONE_DAY;
|
||||
++fixedDate;
|
||||
} else {
|
||||
while (timeOfDay < 0) {
|
||||
timeOfDay += ONE_DAY;
|
||||
timeOfDay += (int)ONE_DAY;
|
||||
--fixedDate;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue