Author: jleroux
Date: Tue Mar 28 05:15:11 2017 New Revision: 1789044 URL: http://svn.apache.org/viewvc?rev=1789044&view=rev Log: No functional changes. Removes a superfluous empty line (ProductSearchSession class) Removes usless same embedded GenericEntityExceptionS in another GenericEntityException (ShipmentServices class) Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java?rev=1789044&r1=1789043&r2=1789044&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java Tue Mar 28 05:15:11 2017 @@ -1248,7 +1248,6 @@ public class ProductSearchSession { return null; } - return featureCountList; } Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java?rev=1789044&r1=1789043&r2=1789044&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java Tue Mar 28 05:15:11 2017 @@ -682,17 +682,11 @@ public class ShipmentServices { // locate the shipment package GenericValue shipmentPackage = EntityQuery.use(delegator).from("ShipmentPackage").where("shipmentId", shipmentId, "shipmentPackageSeqId", packageSeqId).queryOne(); - if (shipmentPackage != null) { if ("00001".equals(packageSeqId)) { // only need to do this for the first package GenericValue rtSeg = null; - try { rtSeg = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId, "shipmentRouteSegmentId", "00001").queryOne(); - } catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } if (rtSeg == null) { rtSeg = delegator.makeValue("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", "00001")); @@ -708,12 +702,7 @@ public class ShipmentServices { rtSeg.set("billingWeight", pkgInfo.get("billingWeight")); rtSeg.set("actualCost", pkgInfo.get("shippingTotal")); rtSeg.set("trackingIdNumber", pkgInfo.get("trackingNumber")); - try { delegator.store(rtSeg); - } catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } } Map<String, Object> pkgCtx = new HashMap<String, Object>(); @@ -722,14 +711,9 @@ public class ShipmentServices { // first update the weight of the package GenericValue pkg = null; - try { pkg = EntityQuery.use(delegator).from("ShipmentPackage") .where(pkgCtx) .queryOne(); - } catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } if (pkg == null) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -739,22 +723,12 @@ public class ShipmentServices { } pkg.set("weight", pkgInfo.get("packageWeight")); - try { delegator.store(pkg); - } catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } // need if we are the first package (only) update the route seg info pkgCtx.put("shipmentRouteSegmentId", "00001"); GenericValue pkgRtSeg = null; - try { pkgRtSeg = EntityQuery.use(delegator).from("ShipmentPackageRouteSeg").where(pkgCtx).queryOne(); - } catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } if (pkgRtSeg == null) { pkgRtSeg = delegator.makeValue("ShipmentPackageRouteSeg", pkgCtx); @@ -769,12 +743,7 @@ public class ShipmentServices { pkgRtSeg.set("trackingCode", pkgInfo.get("trackingNumber")); pkgRtSeg.set("boxNumber", pkgInfo.get("shipmentPackageSeqId")); pkgRtSeg.set("packageServiceCost", pkgInfo.get("packageTotal")); - try { delegator.store(pkgRtSeg); - } catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } shipmentMap.put(shipmentId, pkgInfo.getString("voidIndicator")); } } |
Free forum by Nabble | Edit this page |