The current LocalDateTime.toString implementation concatenates the toString results of date and time, which can be passed to StringBuilder to reduce additional object allocation and improve performance.
------------- Commit messages: - optimize LocalDateTime.toString, reduce StringBuilder allocate Changes: https://git.openjdk.org/jdk/pull/20321/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20321&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8337168 Stats: 26 lines in 3 files changed: 15 ins; 3 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/20321.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20321/head:pull/20321 PR: https://git.openjdk.org/jdk/pull/20321