avoid synchronized with DateTime Format

Description

DateTimeFormatter is thread safe, SimpleDateFormat isn't

https://www.callicoder.com/java-simpledateformat-thread-safety-issues/

Attachments

3
  • 20 Oct 2024, 09:52 am
  • 18 Oct 2024, 01:55 pm
  • 18 Oct 2024, 01:55 pm

Activity

Show:

Zac Spitzer 21 October 2024 at 11:14

I changed the title to avoid synchronized with DateTime Format which we ended up trying to improve with this ticket, the original idea with this ticket was to switch to DateTimeFormatter, but you tried to improve it under this ticket, so now the new ticket makes things clearer for that improvement

Michael Offner 21 October 2024 at 07:54

thishttps://luceeserver.atlassian.net/browse/LDEV-5115 maybe is just a duplicate, the ticket was not really clear to me.

it says “Use thread safe DateTimeFormatter” but the the stacktrace shows an issue with sync because of limiting simultaneous access.

the simple solution to this would be https://luceeserver.atlassian.net/browse/LDEV-5115

Michael Offner 21 October 2024 at 07:50

i think the best cause of action here is to completely switch to “java.time.format.DateTimeFormatter;“ from “SimpleDateFormat“

Michael Offner 21 October 2024 at 07:28

can you please clarify, the code does only sync the creation of the formatter, not it’s use.

Zac Spitzer 20 October 2024 at 18:27

dateformat is not thread safe via jmeter with 6.2.0.120

Fixed

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Affects versions

Priority

Created 20 April 2020 at 13:15
Updated 12 November 2024 at 10:40
Resolved 12 November 2024 at 10:40

Flag notifications