You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2010/04/17 12:28:19 UTC

svn commit: r935164 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/ applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/ applications/cont...

Author: lektran
Date: Sat Apr 17 10:28:18 2010
New Revision: 935164

URL: http://svn.apache.org/viewvc?rev=935164&view=rev
Log:
Fixed a ton of pointless ServiceUtil.returnError(...) calls, I've left the ones that aren't inside services for now since they require a little more thought to fix

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
    ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java Sat Apr 17 10:28:18 2010
@@ -699,7 +699,7 @@ public class GiftCertificateServices {
             giftCertSettings = delegator.findByPrimaryKeyCache("ProductStoreFinActSetting", UtilMisc.toMap("productStoreId", productStoreId, "finAccountTypeId", FinAccountHelper.giftCertFinAccountTypeId));
         } catch (GenericEntityException e) {
             Debug.logError(e, "Unable to get Product Store FinAccount settings for " + FinAccountHelper.giftCertFinAccountTypeId, module);
-            ServiceUtil.returnError("Unable to get Product Store FinAccount settings for " + FinAccountHelper.giftCertFinAccountTypeId + ": " + e.getMessage());
+            return ServiceUtil.returnError("Unable to get Product Store FinAccount settings for " + FinAccountHelper.giftCertFinAccountTypeId + ": " + e.getMessage());
         }
 
         // survey information

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java Sat Apr 17 10:28:18 2010
@@ -136,7 +136,7 @@ public class PayPalServices {
             addCartDetails(encoder, cart);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
-            ServiceUtil.returnError("An error occurred while retreiving cart details");
+            return ServiceUtil.returnError("An error occurred while retreiving cart details");
         }
 
         NVPDecoder decoder;

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Sat Apr 17 10:28:18 2010
@@ -440,7 +440,7 @@ public class PayflowPro {
             addCartDetails(data, cart);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
-            ServiceUtil.returnError("An error occurred while retreiving cart details");
+            return ServiceUtil.returnError("An error occurred while retreiving cart details");
         }
 
         PayflowAPI pfp = init(delegator, paymentGatewayConfigId, null, context);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Sat Apr 17 10:28:18 2010
@@ -1138,7 +1138,7 @@ Debug.logInfo("updateSiteRoles, serviceC
         try {
             thisContent = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId));
             if (thisContent == null)
-                ServiceUtil.returnError("No entity found for id=" + contentId);
+                return ServiceUtil.returnError("No entity found for id=" + contentId);
             thisContent.set("contentTypeId", contentTypeId);
             thisContent.store();
             List kids = ContentWorker.getAssociatedContent(thisContent, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);
@@ -1178,7 +1178,7 @@ Debug.logInfo("updateSiteRoles, serviceC
         try {
             thisContent = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId));
             if (thisContent == null)
-                ServiceUtil.returnError("No entity found for id=" + contentId);
+                return ServiceUtil.returnError("No entity found for id=" + contentId);
             thisContent.set("contentTypeId", "OUTLINE_NODE");
             thisContent.store();
             List kids = ContentWorker.getAssociatedContent(thisContent, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java Sat Apr 17 10:28:18 2010
@@ -124,7 +124,7 @@ public class ContentPermissionServices {
                         partyId = userLogin.getString("partyId");
                     }
                 } catch (GenericEntityException e) {
-                    ServiceUtil.returnError(e.getMessage());
+                    return ServiceUtil.returnError(e.getMessage());
                 }
             }
         }
@@ -216,7 +216,7 @@ public class ContentPermissionServices {
                     results.put("permissionStatus", "rejected");
                 }
             } catch (GenericEntityException e) {
-                ServiceUtil.returnError(e.getMessage());
+                return ServiceUtil.returnError(e.getMessage());
             }
             permissionStatus = (String)results.get("permissionStatus");
             errBuf.append("\n    permissionStatus:");

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java Sat Apr 17 10:28:18 2010
@@ -227,7 +227,7 @@ public class PdfSurveyServices {
             return ServiceUtil.returnError(errMsg);
         } catch (GeneralException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         } catch (Exception e) {
             String errMsg = "Error generating PDF: " + e.toString();
             Debug.logError(e, errMsg, module);
@@ -304,7 +304,7 @@ public class PdfSurveyServices {
             return ServiceUtil.returnError(errMsg);
         } catch (GeneralException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         } catch (Exception e) {
             String errMsg = "Error generating PDF: " + e.toString();
             Debug.logError(e, errMsg, module);
@@ -346,13 +346,13 @@ public class PdfSurveyServices {
 
         } catch (DocumentException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         } catch (GeneralException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         } catch (IOException ioe) {
             System.err.println(ioe.getMessage());
-            ServiceUtil.returnError(ioe.getMessage());
+            return ServiceUtil.returnError(ioe.getMessage());
         }
 
     Map results = ServiceUtil.returnSuccess();
@@ -410,19 +410,19 @@ public class PdfSurveyServices {
             results.put("outByteBuffer", outByteBuffer);
         } catch (DocumentException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         } catch (GeneralException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         } catch (FileNotFoundException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         } catch (IOException ioe) {
             System.err.println(ioe.getMessage());
-            ServiceUtil.returnError(ioe.getMessage());
+            results = ServiceUtil.returnError(ioe.getMessage());
         } catch (Exception ioe) {
             System.err.println(ioe.getMessage());
-            ServiceUtil.returnError(ioe.getMessage());
+            results = ServiceUtil.returnError(ioe.getMessage());
         }
 
     return results;
@@ -492,10 +492,10 @@ public class PdfSurveyServices {
             results.put("outByteBuffer", outByteBuffer);
         } catch (GenericEntityException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         } catch (DocumentException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         }
 
         return results;
@@ -533,7 +533,7 @@ public class PdfSurveyServices {
             results.put("questionsAndAnswers", qAndA);
         } catch (GenericEntityException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         }
 
         return results;
@@ -597,7 +597,7 @@ public class PdfSurveyServices {
             }
         } catch (GenericEntityException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         }
 
         try {
@@ -609,7 +609,7 @@ public class PdfSurveyServices {
             if (ServiceUtil.isError(map)) {
                 String errMsg = ServiceUtil.makeErrorMessage(map, null, null, null, null);
                 System.err.println(errMsg);
-                ServiceUtil.returnError(errMsg);
+                return ServiceUtil.returnError(errMsg);
             }
             String pdfFileNameOut = (String) context.get("pdfFileNameOut");
             ByteBuffer outByteBuffer = (ByteBuffer) map.get("outByteBuffer");
@@ -621,13 +621,13 @@ public class PdfSurveyServices {
             }
         } catch (FileNotFoundException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         } catch (IOException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         } catch (GenericServiceException e) {
             System.err.println(e.getMessage());
-            ServiceUtil.returnError(e.getMessage());
+            results = ServiceUtil.returnError(e.getMessage());
         }
 
     return results;

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java Sat Apr 17 10:28:18 2010
@@ -67,7 +67,7 @@ public class RoutingServices {
         try {
             task = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", taskId));
         } catch (GenericEntityException gee) {
-            ServiceUtil.returnError("Error finding routing task with id: " + taskId);
+            return ServiceUtil.returnError("Error finding routing task with id: " + taskId);
         }
         // FIXME: the ProductionRun.getEstimatedTaskTime(...) method will be removed and
         // its logic will be implemented inside this method.

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sat Apr 17 10:28:18 2010
@@ -1102,7 +1102,7 @@ public class OrderReturnServices {
             orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", UtilMisc.toList("-maxAmount"));
         } catch (GenericEntityException e) {
             Debug.logError("Problem looking up order information for orderId #" + orderId, module);
-            ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "OrderCannotGetOrderHeader", locale));
+            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "OrderCannotGetOrderHeader", locale));
         }
 
         // Check for replacement order
@@ -1112,7 +1112,7 @@ public class OrderReturnServices {
                 returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse");
             } catch (GenericEntityException e) {
                 Debug.logError("Problem getting ReturnItemResponses", module);
-                ServiceUtil.returnError(e.getMessage());
+                return ServiceUtil.returnError(e.getMessage());
             }
 
             for (GenericValue returnItemResponse : returnItemResponses) {
@@ -1123,7 +1123,7 @@ public class OrderReturnServices {
                     returnHeader = returnItem.getRelatedOne("ReturnHeader");
                 } catch (GenericEntityException e) {
                     Debug.logError("Problem getting ReturnItem", module);
-                    ServiceUtil.returnError(e.getMessage());
+                    return ServiceUtil.returnError(e.getMessage());
                 }
 
                 if ("RETURN_RECEIVED".equals(returnHeader.getString("statusId"))) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sat Apr 17 10:28:18 2010
@@ -4578,7 +4578,7 @@ public class OrderServices {
                                     sci.setOrderItemAssocTypeId("DROP_SHIPMENT");
                                     // TODO: we should consider also the ship group in the association between sales and purchase orders
                                 } catch (Exception e) {
-                                    ServiceUtil.returnError("The following error occurred creating drop shipments for order [" + orderId + "]: " + e.getMessage());
+                                    return ServiceUtil.returnError("The following error occurred creating drop shipments for order [" + orderId + "]: " + e.getMessage());
                                 }
                             }
                         }

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Sat Apr 17 10:28:18 2010
@@ -1760,7 +1760,7 @@ public class PartyServices {
             partiesFound = PartyWorker.findPartiesById(delegator, idToFind, partyIdentificationTypeId, searchPartyFirst, searchAllId);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         }
 
         if (UtilValidate.isNotEmpty(partiesFound)) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Sat Apr 17 10:28:18 2010
@@ -980,7 +980,7 @@ public class ProductServices {
                 fileExtension = delegator.findByAnd("FileExtension", UtilMisc.toMap("mimeTypeId", (String) context.get("_uploadedFile_contentType")));
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
-                ServiceUtil.returnError(e.getMessage());
+                return ServiceUtil.returnError(e.getMessage());
             }
 
             GenericValue extension = EntityUtil.getFirst(fileExtension);
@@ -1040,7 +1040,7 @@ public class ProductServices {
                         content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
 
                     if (content != null) {
@@ -1049,7 +1049,7 @@ public class ProductServices {
                             dataResource = content.getRelatedOne("DataResource");
                         } catch (GenericEntityException e) {
                             Debug.logError(e, module);
-                            ServiceUtil.returnError(e.getMessage());
+                            return ServiceUtil.returnError(e.getMessage());
                         }
 
                         if (dataResource != null) {
@@ -1058,7 +1058,7 @@ public class ProductServices {
                                 dispatcher.runSync("updateDataResource", dataResourceCtx);
                             } catch (GenericServiceException e) {
                                 Debug.logError(e, module);
-                                ServiceUtil.returnError(e.getMessage());
+                                return ServiceUtil.returnError(e.getMessage());
                             }
                         } else {
                             dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT");
@@ -1068,7 +1068,7 @@ public class ProductServices {
                                 dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
                             } catch (GenericServiceException e) {
                                 Debug.logError(e, module);
-                                ServiceUtil.returnError(e.getMessage());
+                                return ServiceUtil.returnError(e.getMessage());
                             }
 
                             Map<String, Object> contentCtx = FastMap.newInstance();
@@ -1079,7 +1079,7 @@ public class ProductServices {
                                 dispatcher.runSync("updateContent", contentCtx);
                             } catch (GenericServiceException e) {
                                 Debug.logError(e, module);
-                                ServiceUtil.returnError(e.getMessage());
+                                return ServiceUtil.returnError(e.getMessage());
                             }
                         }
 
@@ -1088,7 +1088,7 @@ public class ProductServices {
                             dispatcher.runSync("updateProductContent", productContentCtx);
                         } catch (GenericServiceException e) {
                             Debug.logError(e, module);
-                            ServiceUtil.returnError(e.getMessage());
+                            return ServiceUtil.returnError(e.getMessage());
                         }
                     }
                 } else {
@@ -1099,7 +1099,7 @@ public class ProductServices {
                         dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
 
                     Map<String, Object> contentCtx = FastMap.newInstance();
@@ -1111,7 +1111,7 @@ public class ProductServices {
                         contentResult = dispatcher.runSync("createContent", contentCtx);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
 
                     productContentCtx.put("contentId", contentResult.get("contentId"));
@@ -1119,7 +1119,7 @@ public class ProductServices {
                         dispatcher.runSync("createProductContent", productContentCtx);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
                 }
             }
@@ -1150,7 +1150,7 @@ public class ProductServices {
             productsFound = ProductWorker.findProductsById(delegator, idToFind, goodIdentificationTypeId, searchProductFirst, searchAllId);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         }
 
         if (UtilValidate.isNotEmpty(productsFound)) {
@@ -1197,7 +1197,7 @@ public class ProductServices {
                 fileExtension = delegator.findList("FileExtension", EntityCondition.makeCondition("mimeTypeId", EntityOperator.EQUALS, (String) context.get("_uploadedFile_contentType")), null, null, null, false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
-                ServiceUtil.returnError(e.getMessage());
+                return ServiceUtil.returnError(e.getMessage());
             }
 
             GenericValue extension = EntityUtil.getFirst(fileExtension);
@@ -1245,7 +1245,7 @@ public class ProductServices {
                         content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
 
                     if (UtilValidate.isNotEmpty(content)) {
@@ -1254,7 +1254,7 @@ public class ProductServices {
                             dataResource = content.getRelatedOne("DataResource");
                         } catch (GenericEntityException e) {
                             Debug.logError(e, module);
-                            ServiceUtil.returnError(e.getMessage());
+                            return ServiceUtil.returnError(e.getMessage());
                         }
 
                         if (UtilValidate.isNotEmpty(dataResource)) {
@@ -1263,7 +1263,7 @@ public class ProductServices {
                                 dispatcher.runSync("updateDataResource", dataResourceCtx);
                             } catch (GenericServiceException e) {
                                 Debug.logError(e, module);
-                                ServiceUtil.returnError(e.getMessage());
+                                return ServiceUtil.returnError(e.getMessage());
                             }
                         } else {
                             dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT");
@@ -1273,7 +1273,7 @@ public class ProductServices {
                                 dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
                             } catch (GenericServiceException e) {
                                 Debug.logError(e, module);
-                                ServiceUtil.returnError(e.getMessage());
+                                return ServiceUtil.returnError(e.getMessage());
                             }
 
                             Map<String, Object> contentCtx = FastMap.newInstance();
@@ -1284,7 +1284,7 @@ public class ProductServices {
                                 dispatcher.runSync("updateContent", contentCtx);
                             } catch (GenericServiceException e) {
                                 Debug.logError(e, module);
-                                ServiceUtil.returnError(e.getMessage());
+                                return ServiceUtil.returnError(e.getMessage());
                             }
                         }
 
@@ -1293,7 +1293,7 @@ public class ProductServices {
                             dispatcher.runSync("updateProductPromoContent", productPromoContentCtx);
                         } catch (GenericServiceException e) {
                             Debug.logError(e, module);
-                            ServiceUtil.returnError(e.getMessage());
+                            return ServiceUtil.returnError(e.getMessage());
                         }
                     }
                 } else {
@@ -1304,7 +1304,7 @@ public class ProductServices {
                         dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
 
                     Map<String, Object> contentCtx = FastMap.newInstance();
@@ -1316,7 +1316,7 @@ public class ProductServices {
                         contentResult = dispatcher.runSync("createContent", contentCtx);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
 
                     productPromoContentCtx.put("contentId", contentResult.get("contentId"));
@@ -1324,7 +1324,7 @@ public class ProductServices {
                         dispatcher.runSync("createProductPromoContent", productPromoContentCtx);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
-                        ServiceUtil.returnError(e.getMessage());
+                        return ServiceUtil.returnError(e.getMessage());
                     }
                 }
             }
@@ -1340,7 +1340,7 @@ public class ProductServices {
                 dispatcher.runSync("updateProductPromoContent", productPromoContentCtx);
             } catch (GenericServiceException e) {
                 Debug.logError(e, module);
-                ServiceUtil.returnError(e.getMessage());
+                return ServiceUtil.returnError(e.getMessage());
             }
         }
         return ServiceUtil.returnSuccess();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Sat Apr 17 10:28:18 2010
@@ -790,7 +790,7 @@ public class FedexServices {
                     if (! packageWeightUomId.equals(weightUomId)) {
                         Map<String, Object> results = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", packageWeightUomId, "uomIdTo", weightUomId, "originalValue", packageWeight));
                         if (ServiceUtil.isError(results) || (results.get("convertedValue") == null)) {
-                            ServiceUtil.returnError("Unable to convert weight for package " + shipmentPackage.getString("shipmentPackageSeqId") + " of shipmentRouteSegment " + shipmentRouteSegmentId + " of shipment " + shipmentId);
+                            return ServiceUtil.returnError("Unable to convert weight for package " + shipmentPackage.getString("shipmentPackageSeqId") + " of shipmentRouteSegment " + shipmentRouteSegmentId + " of shipment " + shipmentId);
                         } else {
                             packageWeight = (BigDecimal) results.get("convertedValue");
                         }
@@ -798,7 +798,7 @@ public class FedexServices {
                 }
                 BigDecimal weight = hasBillingWeight ? billingWeight : packageWeight;
                 if (weight == null || weight.compareTo(BigDecimal.ZERO) < 0) {
-                    ServiceUtil.returnError("Unable to determine weight for package " + shipmentPackage.getString("shipmentPackageSeqId") + " of shipmentRouteSegment " + shipmentRouteSegmentId + " of shipment " + shipmentId);
+                    return ServiceUtil.returnError("Unable to determine weight for package " + shipmentPackage.getString("shipmentPackageSeqId") + " of shipmentRouteSegment " + shipmentRouteSegmentId + " of shipment " + shipmentId);
                 }
 
                 // Populate the Freemarker context with package-related information

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Sat Apr 17 10:28:18 2010
@@ -1524,7 +1524,7 @@ public class UspsServices {
             Debug.logError(e, module);
         }
         if (originAddress == null || originTelecomNumber == null) {
-            ServiceUtil.returnError("Unable to request a USPS Priority Mail International Label: ShipmentRouteSegment is missing origin phone or address details");
+            return ServiceUtil.returnError("Unable to request a USPS Priority Mail International Label: ShipmentRouteSegment is missing origin phone or address details");
         }
 
         // Origin Info

Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=935164&r1=935163&r2=935164&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java Sat Apr 17 10:28:18 2010
@@ -203,7 +203,7 @@ public class EntityPermissionChecker {
                 results.put("permissionStatus", "rejected");
             }
         } catch (GenericEntityException e) {
-            ServiceUtil.returnError(e.getMessage());
+            return ServiceUtil.returnError(e.getMessage());
         }
         return results;
     }