You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2023/01/24 20:51:00 UTC
[jira] [Assigned] (DAFFODIL-2774) ICU4J DecimalFormat is thread-safe as of ICU 59
[ https://issues.apache.org/jira/browse/DAFFODIL-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Lawrence reassigned DAFFODIL-2774:
----------------------------------------
Assignee: Steve Lawrence
> ICU4J DecimalFormat is thread-safe as of ICU 59
> -----------------------------------------------
>
> Key: DAFFODIL-2774
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2774
> Project: Daffodil
> Issue Type: Bug
> Reporter: Steve Lawrence
> Assignee: Steve Lawrence
> Priority: Minor
> Fix For: 3.5.0
>
>
> The ICU4J DecimalFormat java docs have this to say about thread safety:
> {quote}Starting with ICU 59, instances of DecimalFormat are thread-safe.
> Under the hood, DecimalFormat maintains an immutable formatter object that is rebuilt whenever any of the property setters are called. It is therefore best practice to call property setters only during construction and not when formatting numbers online.
> {quote}
> This wasn't the case when we originally started using DecimalFormat, so we have a number of ThreadLocal[DecimalFormat]'s through our codebase. We should remove these ThreadLocal's–makes the code cleaner and could potentially improve performance by removing any ThreadLocal overhead.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)