[jira] [Created] (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] [Created] (OFBIZ-7587) Enforce noninstantiability to UtilFormatOut class

Nicolas Malin (Jira)
Rishi Solanki created OFBIZ-7587:
------------------------------------

             Summary: 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
            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)