Conversation
|
petruki
added a commit
that referenced
this pull request
Jun 27, 2026
petruki
added a commit
that referenced
this pull request
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request modernizes the date and time handling throughout the codebase by replacing legacy
DateandDateUtilsusage with Java 8+ time APIs such asInstantandLocalDateTime. This improves code readability, safety, and future maintainability. It also updates related test code and exception handling to align with the new APIs.Migration to Java Time API:
DateandDateUtilswithInstant,LocalDateTime, and related classes inClientRemoteService,DateValidator,TimeValidator,SwitcherUtils, and their corresponding test files. This includes updating method signatures, parsing, formatting, and arithmetic operations. [1] [2] [3] [4] [5] [6]Refactoring and Simplification:
SwitcherUtils.addTimeDurationto useInstant.pluswithChronoUnitinstead of Apache Commons methods.isBefore/isAftermethods, improving clarity and type safety. [1] [2]Test Updates:
SwitcherUtilsTestandMockWebServerHelperto use the new time APIs, ensuring consistency and correctness with the updated implementation. [1] [2] [3]Exception Handling:
DateTimeParseExceptioninstead ofParseException, reflecting the switch to Java time parsing. [1] [2]Overall, these changes modernize the codebase, reduce external dependencies, and leverage Java's built-in time handling for better reliability and maintainability.