svn commit: r1749891 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java

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

svn commit: r1749891 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java

Arun Patidar-4
Author: arunpatidar
Date: Thu Jun 23 13:50:47 2016
New Revision: 1749891

URL: http://svn.apache.org/viewvc?rev=1749891&view=rev
Log:
Applied patch from jira issue - OFBIZ-7378 - Enforce noninstantiability to InvoiceWorker Class. Thanks Rishi Solanki and Pratik Kulshreshth for your contribution.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=1749891&r1=1749890&r2=1749891&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Thu Jun 23 13:50:47 2016
@@ -47,14 +47,16 @@ import org.ofbiz.entity.util.EntityUtilP
 /**
  * InvoiceWorker - Worker methods of invoices
  */
-public class InvoiceWorker {
+public final class InvoiceWorker {
 
-    public static String module = InvoiceWorker.class.getName();
-    private static BigDecimal ZERO = BigDecimal.ZERO;
-    private static int decimals = UtilNumber.getBigDecimalScale("invoice.decimals");
-    private static int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
-    private static int taxDecimals = UtilNumber.getBigDecimalScale("salestax.calc.decimals");
-    private static int taxRounding = UtilNumber.getBigDecimalRoundingMode("salestax.rounding");
+    public static final String module = InvoiceWorker.class.getName();
+    private static final BigDecimal ZERO = BigDecimal.ZERO;
+    private static final int decimals = UtilNumber.getBigDecimalScale("invoice.decimals");
+    private static final int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
+    private static final int taxDecimals = UtilNumber.getBigDecimalScale("salestax.calc.decimals");
+    private static final int taxRounding = UtilNumber.getBigDecimalRoundingMode("salestax.rounding");
+
+    private InvoiceWorker () {}
 
     /**
      * Return the total amount of the invoice (including tax) using the the invoiceId as input.