RFR: 8330053: JFR: Use LocalDateTime instead ZonedDateTime

Erik Gahlin egahlin at openjdk.org
Thu Apr 11 13:22:49 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

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

Commit messages:
 - Initial

Changes: https://git.openjdk.org/jdk/pull/18729/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18729&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8330053
  Stats: 3 lines in 1 file changed: 0 ins; 1 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