Author: lektran
Date: Sat Mar 27 20:51:09 2010
New Revision: 928267

URL: http://svn.apache.org/viewvc?rev=928267&view=rev
Log:
Remove throws declarations for exceptions that are never thrown

Modified:
    
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
    
ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

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=928267&r1=928266&r2=928267&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
 Sat Mar 27 20:51:09 2010
@@ -205,7 +205,7 @@ public class ProductWorker {
      * invokes the getInventoryAvailableByFacility service, returns true if 
specified quantity is available, else false
      * this is only used in the related method that uses a 
ProductConfigWrapper, until that is refactored into a service as well...
      */
-    private static boolean isProductInventoryAvailableByFacility(String 
productId, String inventoryFacilityId, BigDecimal quantity, LocalDispatcher 
dispatcher) throws GenericServiceException {
+    private static boolean isProductInventoryAvailableByFacility(String 
productId, String inventoryFacilityId, BigDecimal quantity, LocalDispatcher 
dispatcher) {
         BigDecimal availableToPromise = null;
 
         try {
@@ -237,7 +237,7 @@ public class ProductWorker {
      * Invokes the getInventoryAvailableByFacility service, returns true if 
specified quantity is available for all the selected parts, else false.
      * Also, set the available flag for all the product configuration's 
options.
      **/
-    public static boolean 
isProductInventoryAvailableByFacility(ProductConfigWrapper productConfig, 
String inventoryFacilityId, BigDecimal quantity, LocalDispatcher dispatcher) 
throws GenericServiceException {
+    public static boolean 
isProductInventoryAvailableByFacility(ProductConfigWrapper productConfig, 
String inventoryFacilityId, BigDecimal quantity, LocalDispatcher dispatcher) {
         boolean available = true;
         List<ConfigOption> options = productConfig.getSelectedOptions();
         for (ConfigOption ci: options) {

Modified: 
ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=928267&r1=928266&r2=928267&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
 (original)
+++ 
ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
 Sat Mar 27 20:51:09 2010
@@ -674,13 +674,7 @@ public class ProductStoreWorker {
                 return false;
             }
 
-            try {
-                isInventoryAvailable = 
ProductWorker.isProductInventoryAvailableByFacility(productConfig, 
inventoryFacilityId, quantity, dispatcher);
-            } catch (GenericServiceException e) {
-                Debug.logWarning(e, "Error invoking 
isProductInventoryAvailableByFacility in isCatalogInventoryAvailable", module);
-                return false;
-            }
-            return isInventoryAvailable;
+            return 
ProductWorker.isProductInventoryAvailableByFacility(productConfig, 
inventoryFacilityId, quantity, dispatcher);
 
         } else {
             GenericValue product = productConfig.getProduct();
@@ -695,14 +689,9 @@ public class ProductStoreWorker {
 
             if (UtilValidate.isNotEmpty(productFacilities)) {
                 for (GenericValue pfValue: productFacilities) {
-                    try {
-                        isInventoryAvailable = 
ProductWorker.isProductInventoryAvailableByFacility(productConfig, 
pfValue.getString("facilityId"), quantity, dispatcher);
-                        if (isInventoryAvailable == true) {
-                            return isInventoryAvailable;
-                        }
-                    } catch (GenericServiceException e) {
-                        Debug.logWarning(e, "Error invoking 
isProductInventoryAvailableByFacility in isCatalogInventoryAvailable", module);
-                        return false;
+                    isInventoryAvailable = 
ProductWorker.isProductInventoryAvailableByFacility(productConfig, 
pfValue.getString("facilityId"), quantity, dispatcher);
+                    if (isInventoryAvailable == true) {
+                        return isInventoryAvailable;
                     }
                 }
             }


Reply via email to