[jira] [Assigned] (OFBIZ-7587) Enforce noninstantiability to UtilFormatOut class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Assigned] (OFBIZ-7587) Enforce noninstantiability to UtilFormatOut class

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-7587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Koushal reassigned OFBIZ-7587:
------------------------------------

    Assignee: Rohit Koushal

> Enforce noninstantiability to UtilFormatOut class
> -------------------------------------------------
>
>                 Key: OFBIZ-7587
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7587
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Rishi Solanki
>            Assignee: Rohit Koushal
>            Priority: Minor
>
> - Make class as final.
> - Add a private constructor.
> - Make the following static variable as private static final. Also move it to begining of the class with FIXME: comment
> {code}
>     // ------------------- price format handlers -------------------
>     // FIXME: This is not thread-safe! DecimalFormat is not synchronized.
>     static DecimalFormat priceDecimalFormat = new DecimalFormat(UtilProperties.getPropertyValue("general", "currency.decimal.format", "#,##0.00"));
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)