On Wed, 25 Mar 2026 10:43:43 GMT, Daniel Fuchs <[email protected]> wrote:
>> Thanks for the suggestion @jaikiran. I've refactored expiryDate2DeltaSeconds >> into a static parseExpires method that returns the parsed Calendar, or null >> on failure. >> >> The delta calculation is now done at the call site. >> >> Also removed the EXPIRY_DATE_PARSE_FAILURE constant, the unnecessary >> try-catch around the expires handling, and updated the method comment and >> B6791927.java @summary. > > I know this is pre-existing logic but would it be hard to use `java.time` > APIs instead of `Calendar`? > Could that method return an `Instant` instead of a `Calendar`? I looked into it, but `DateTimeFormatter` performs a day-of-week cross-check that `SimpleDateFormat` silently ignores, which would change observable parsing behavior and affect existing tests. I think the migration would be cleaner as a separate follow-up PR. Would that be acceptable? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30341#discussion_r2998346241
