[OPENAM-5995] DebugImpl uses unsychronized SimpleDateFormat for timestamps Created: 15/May/15  Updated: 20/Oct/15  Resolved: 20/Oct/15

Status: Resolved
Project: OpenAM
Component/s: audit logging
Affects Version/s: 12.0.0, 13.0.0
Fix Version/s: 12.0.3, 13.0.0

Type: Bug Priority: Major
Reporter: Neil Madden Assignee: Quentin CASTEL [X] (Inactive)
Resolution: Fixed Votes: 0
Labels: EDISON
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Target Version/s:
Rank: 1|hzlkfj:
Sprint: AM Sustaining Sprint 13


com.sun.identity.shared.debug.impl.DebugImpl uses a shared SimpleDateFormat field (dateFormat) for formatting timestamps. As DebugImpl instances are shared between threads and SimpleDateFormat is not thread-safe, this could result in erroneous time-stamps being recorded as subsequent log operations may overwrite internal state during formatting.

Either a fresh SimpleDateFormat should be created each time, or a thread-local copy, or access should be synchronized to prevent errors.

Generated at Tue Mar 09 10:10:11 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.