Author: arunpatidar
Date: Wed Jun 29 14:02:57 2016
New Revision: 1750646
URL:
http://svn.apache.org/viewvc?rev=1750646&view=revLog:
Applied patch from jira issue - OFBIZ-7463 - Enforce noninstantiability to ShipmentWorker Class. Thanks Rishi Solanki and Rahul Singh Kushwah for your contribution.
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java?rev=1750646&r1=1750645&r2=1750646&view=diff==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java Wed Jun 29 14:02:57 2016
@@ -40,10 +40,13 @@ import org.ofbiz.service.ModelService;
/**
* ShipmentWorker - Worker methods for Shipment and related entities
*/
-public class ShipmentWorker {
+public final class ShipmentWorker {
public static final String module = ShipmentWorker.class.getName();
- public static final MathContext generalRounding = new MathContext(10);
+ private static final MathContext generalRounding = new MathContext(10);
+
+ private ShipmentWorker() {}
+
/*
* Returns the value of a given ShipmentPackageContent record. Calculated by working out the total value (from the OrderItems) of all ItemIssuances
* for the ShipmentItem then dividing that by the total quantity issued for the same to get an average item value then multiplying that by the package