From 9fe4260342f3d1127d80d229f448bb0f66b660e7 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Mon, 3 Oct 2016 11:12:48 +0000 Subject: [PATCH] Improves: After r1761181 some useful comments were removed. This readds them Also some comments were not removed but should have been, this removes them No functional changes git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1763154 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/ofbiz/product/product/ProductServices.java | 11 +++++++---- .../apache/ofbiz/shipment/packing/PackingSession.java | 1 - .../main/java/org/apache/ofbiz/base/util/UtilXml.java | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java b/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java index 3f6930057f..383d362d4f 100644 --- a/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java +++ b/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java @@ -22,8 +22,6 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; -import java.lang.NullPointerException; -import java.lang.SecurityException; import java.math.BigDecimal; import java.nio.ByteBuffer; import java.sql.Timestamp; @@ -38,7 +36,6 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import org.jdom.JDOMException; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilDateTime; import org.apache.ofbiz.base.util.UtilGenerics; @@ -63,6 +60,7 @@ import org.apache.ofbiz.service.GenericServiceException; import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.ModelService; import org.apache.ofbiz.service.ServiceUtil; +import org.jdom.JDOMException; /** * Product Services @@ -138,6 +136,8 @@ public class ProductServices { * Finds product variants based on a product ID and a distinct feature. */ public static Map prodFindDistinctVariants(DispatchContext dctx, Map context) { + // * String productId -- Parent (virtual) product ID + // * String feature -- Distinct feature name //TODO This service has not yet been implemented. return ServiceUtil.returnFailure(); } @@ -340,6 +340,8 @@ public class ProductServices { * Gets the product features of a product. */ public static Map prodGetFeatures(DispatchContext dctx, Map context) { + // String type -- Type of feature (STANDARD_FEATURE, SELECTABLE_FEATURE) + // String distinct -- Distinct feature (SIZE, COLOR) Delegator delegator = dctx.getDelegator(); Map result = new HashMap(); String productId = (String) context.get("productId"); @@ -415,6 +417,7 @@ public class ProductServices { * Finds associated products by product ID and association ID. */ public static Map prodFindAssociatedByType(DispatchContext dctx, Map context) { + // String type -- Type of association (ie PRODUCT_UPGRADE, PRODUCT_COMPLEMENT, PRODUCT_VARIANT) Delegator delegator = dctx.getDelegator(); Map result = new HashMap(); String productId = (String) context.get("productId"); @@ -873,7 +876,7 @@ public class ProductServices { } public static Map updateProductIfAvailableFromShipment(DispatchContext dctx, Map context) { - Delegator delegator = dctx.getDelegator(); + Delegator delegator = dctx.getDelegator(); if ("Y".equals(EntityUtilProperties.getPropertyValue("catalog", "reactivate.product.from.receipt", "N", delegator))) { LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); diff --git a/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java b/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java index fa7f73bd45..7c7edf830c 100644 --- a/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java +++ b/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java @@ -621,7 +621,6 @@ public class PackingSession implements java.io.Serializable { } public String complete(boolean force) throws GeneralException { - // clear out empty lines // check to see if there is anything to process if (this.getLines().size() == 0) { return "EMPTY"; diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java index 4fd57e6e07..9d5837f4ec 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java @@ -421,7 +421,6 @@ public final class UtilXml { long startTime = System.currentTimeMillis(); - // DON'T do this: seems to be causing problems with Catalina/Tomcat, maybe it is expecting a different parser? Document document = null; /* Standard JAXP (mostly), but doesn't seem to be doing XML Schema validation, so making sure that is on... */