You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Rohit Koushal (JIRA)" <ji...@apache.org> on 2016/06/24 14:04:16 UTC

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

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

Rohit Koushal updated OFBIZ-7587:
---------------------------------
    Attachment: OFBIZ-7587.patch

Thanks [~rishisolankii] for the details. Here is the patch for the ticket.

> 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
>         Attachments: OFBIZ-7587.patch
>
>
> - 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)