svn commit: r1749892 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java

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

svn commit: r1749892 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java

Arun Patidar-4
Author: arunpatidar
Date: Thu Jun 23 13:58:42 2016
New Revision: 1749892

URL: http://svn.apache.org/viewvc?rev=1749892&view=rev
Log:
Applied patch from jira issue - OFBIZ-7379 - Enforce noninstantiability to PaymentWorker Class. Thanks Rishi Solanki and Amit Gadaley for your contribution.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java?rev=1749892&r1=1749891&r2=1749892&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java Thu Jun 23 13:58:42 2016
@@ -45,11 +45,13 @@ import org.ofbiz.entity.util.EntityUtil;
 /**
  * Worker methods for Payments
  */
-public class PaymentWorker {
+public final class PaymentWorker {
 
     public static final String module = PaymentWorker.class.getName();
-    private static int decimals = UtilNumber.getBigDecimalScale("invoice.decimals");
-    private static int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
+    private static final int decimals = UtilNumber.getBigDecimalScale("invoice.decimals");
+    private static final int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
+
+    private PaymentWorker() {}
 
     // to be able to use in minilanguage where Boolean cannot be used
     public static List<Map<String, GenericValue>> getPartyPaymentMethodValueMaps(Delegator delegator, String partyId) {