Author: adrianc
Date: Sun Feb 12 23:19:33 2012 New Revision: 1243364 URL: http://svn.apache.org/viewvc?rev=1243364&view=rev Log: Add private constructors to static utility classes. Patch provided by Rishi Solanki - https://issues.apache.org/jira/browse/OFBIZ-4656. Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactHelper.java Sun Feb 12 23:19:33 2012 @@ -36,6 +36,8 @@ public class ContactHelper { public static final String module = ContactHelper.class.getName(); + private ContactHelper() {} + public static Collection<GenericValue> getContactMech(GenericValue party, boolean includeOld) { return getContactMech(party, null, null, includeOld); } Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java Sun Feb 12 23:19:33 2012 @@ -50,6 +50,8 @@ public class ContactMechWorker { public static final String module = ContactMechWorker.class.getName(); + private ContactMechWorker() {} + public static List<Map<String, Object>> getPartyContactMechValueMaps(Delegator delegator, String partyId, boolean showOld) { return getPartyContactMechValueMaps(delegator, partyId, showOld, null); } Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java Sun Feb 12 23:19:33 2012 @@ -34,6 +34,8 @@ public class PartyHelper { public static final String module = PartyHelper.class.getName(); + private PartyHelper() {} + public static String getPartyName(GenericValue partyObject) { return getPartyName(partyObject, false); } Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Sun Feb 12 23:19:33 2012 @@ -52,6 +52,8 @@ public class PartyWorker { public static String module = PartyWorker.class.getName(); + private PartyWorker() {} + public static Map<String, GenericValue> getPartyOtherValues(ServletRequest request, String partyId, String partyAttr, String personAttr, String partyGroupAttr) { Delegator delegator = (Delegator) request.getAttribute("delegator"); Map<String, GenericValue> result = FastMap.newInstance(); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java Sun Feb 12 23:19:33 2012 @@ -48,6 +48,8 @@ public class CatalogWorker { public static final String module = CatalogWorker.class.getName(); + private CatalogWorker () {} + public static String getWebSiteId(ServletRequest request) { return WebSiteWorker.getWebSiteId(request); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Sun Feb 12 23:19:33 2012 @@ -50,6 +50,8 @@ public class CategoryWorker { public static final String module = CategoryWorker.class.getName(); + private CategoryWorker () {} + public static String getCatalogTopCategory(ServletRequest request, String defaultTopCategory) { HttpServletRequest httpRequest = (HttpServletRequest) request; Map<String, Object> requestParameters = UtilHttp.getParameterMap(httpRequest); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Sun Feb 12 23:19:33 2012 @@ -59,6 +59,8 @@ public class ProductWorker { public static final MathContext generalRounding = new MathContext(10); + private ProductWorker () {} + public static boolean shippingApplies(GenericValue product) { String errMsg = ""; if (product != null) { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java Sun Feb 12 23:19:33 2012 @@ -52,6 +52,8 @@ public class UtilMisc { public static final BigDecimal ZERO_BD = BigDecimal.ZERO; + private UtilMisc () {} + public static final <T extends Throwable> T initCause(T throwable, Throwable cause) { throwable.initCause(cause); return throwable; Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java?rev=1243364&r1=1243363&r2=1243364&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java Sun Feb 12 23:19:33 2012 @@ -39,6 +39,8 @@ public class UomWorker { public static final String module = UomWorker.class.getName(); + private UomWorker () {} + public static int[] uomTimeToCalTime(String uomId) { if ("TF_ms".equals(uomId)) { return new int[] { Calendar.MILLISECOND, 1 }; |
Free forum by Nabble | Edit this page |