[jdk17u-dev] RFR: 8367901: Calendar.roll(hour, 24) returns wrong result
Goetz Lindenmaier
goetz at openjdk.org
Wed Dec 3 12:16:32 UTC 2025
On Tue, 11 Nov 2025 17:46:49 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
@rm-gh-8
Please request approval again after 21 has been approved.
-------------
PR Comment: https://git.openjdk.org/jdk17u-dev/pull/4167#issuecomment-3606574769
More information about the jdk-updates-dev
mailing list