[jdk21u-dev] RFR: 8367901: Calendar.roll(hour, 24) returns wrong result

Goetz Lindenmaier goetz at openjdk.org
Fri Nov 14 13:15:11 UTC 2025


On Tue, 11 Nov 2025 17:27:36 GMT, Roland Mesde <duke at openjdk.org> wrote:

> Backporting JDK-8367901: Calendar.roll(hour, 24) returns wrong result. Fixes the roll implementation and adds a new test. Ran GHA Sanity Checks (passed) and new test (passed). The merge conflict was just the copyright header which was updated to the newer one. The new test needed to be updated for compatibility with the older JDK.
> 
> Key changes for the new test:
> 
> 1.  @FieldSource → @MethodSource: Changed to method source and created hours() method
> 2. List.of() → Arrays.asList(): Used Arrays.asList for better compatibility
> 3. .toList() → .collect(Collectors.toList()): Explicit collection instead of toList()
> 4. var → explicit types: Replaced var declarations with explicit types
> 5. Enhanced for loops: Used traditional for-each syntax instead of var

HI @rm-gh-8 
Please request again once it's approved for 25.
(It spams my queue for approvals if these pile up).

-------------

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2460#issuecomment-3532680520


More information about the jdk-updates-dev mailing list