RFR: 8330053: JFR: Use LocalDateTime instead ZonedDateTime [v3]
Erik Gahlin
egahlin at openjdk.org
Wed Apr 17 09:48:29 UTC 2024
> Could I have a review of PR that changes so LocalDateTime instead of ZonedDateTime is used when naming chunk files. Problem is that a java.time.DateTimeException occurs when ZonedDateTime.now() is used and the time zone is invalid. This happens in a JCK test.
>
> It would be possible to catch the exception and fallback to LocalDateTime, but it seems better to have filenames that can't be manipulated if an application calls TimeZone::setDefault. That said, if there is a good argument to use a fallback and not always the default time zone, please let me know.
>
> Testing: jdk/jdk/jfr + applicable test in JCK.
>
> Thanks
> Erik
Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision:
Fallback for invalid timezone
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18729/files
- new: https://git.openjdk.org/jdk/pull/18729/files/d51e83a2..65e0f31c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18729&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18729&range=01-02
Stats: 13 lines in 1 file changed: 11 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/18729.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18729/head:pull/18729
PR: https://git.openjdk.org/jdk/pull/18729
More information about the hotspot-jfr-dev
mailing list