Author: jleroux
Date: Sat Nov 28 13:59:45 2009 New Revision: 885092 URL: http://svn.apache.org/viewvc?rev=885092&view=rev Log: Fix r885091 where isNotEmpty has been used by error instead of isEmpty Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Sat Nov 28 13:59:45 2009 @@ -360,7 +360,7 @@ if (UtilValidate.isEmpty(login)) { Debug.logInfo("the login property in " + configStr + " is not configured.", module); } - if (UtilValidate.isEmpty((password)) && !("3.1".equals(ver))) { + if (UtilValidate.isEmpty(password) && !("3.1".equals(ver))) { Debug.logInfo("The password property in " + configStr + " is not configured.", module); } if ("3.1".equals(ver)) { Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Sat Nov 28 13:59:45 2009 @@ -156,7 +156,7 @@ List accounts = delegator.findByAnd("FinAccount", UtilMisc.toMap("finAccountCode", encryptedFinAccountCode)); accounts = EntityUtil.filterByDate(accounts); - if (UtilValidate.isNotEmpty(accounts)) { + if (UtilValidate.isEmpty(accounts)) { // OK to display - not a code anyway Debug.logWarning("No fin account found for account code [" + finAccountCode + "]", module); return null; Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sat Nov 28 13:59:45 2009 @@ -337,7 +337,7 @@ */ public Long getOrderTermNetDays() { List<GenericValue> orderTerms = EntityUtil.filterByAnd(getOrderTerms(), UtilMisc.toMap("termTypeId", "FIN_PAYMENT_TERM")); - if (UtilValidate.isNotEmpty(orderTerms)) { + if (UtilValidate.isEmpty(orderTerms)) { return null; } else if (orderTerms.size() > 1) { Debug.logWarning("Found " + orderTerms.size() + " FIN_PAYMENT_TERM order terms for orderId [" + getOrderId() + "], using the first one ", module); 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=885092&r1=885091&r2=885092&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 Nov 28 13:59:45 2009 @@ -3110,7 +3110,7 @@ List allProductContent = product.getRelated("ProductContent"); // try looking up the parent product if the product has no content and is a variant - if (UtilValidate.isNotEmpty(allProductContent) && ("Y".equals(product.getString("isVariant")))) { + if (UtilValidate.isEmpty(allProductContent) && ("Y".equals(product.getString("isVariant")))) { GenericValue parentProduct = ProductWorker.getParentProduct(product.getString("productId"), delegator); if (allProductContent == null) { allProductContent = FastList.newInstance(); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Sat Nov 28 13:59:45 2009 @@ -457,7 +457,7 @@ } if (cart.isPinRequiredForGC(delegator)) { // if a PIN is required, make sure the PIN is valid - if (UtilValidate.isNotEmpty((gcPin)) { + if (UtilValidate.isEmpty(gcPin)) { errMsg = UtilProperties.getMessage(resource_error,"checkhelper.enter_gift_card_pin_number", (cart != null ? cart.getLocale() : Locale.getDefault())); errorMessages.add(errMsg); gcFieldsOkay = false; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java Sat Nov 28 13:59:45 2009 @@ -43,8 +43,8 @@ * @return int - Scale factor to pass to BigDecimal's methods. Defaults to DEFAULT_BD_SCALE (2) */ public static int getBigDecimalScale(String file, String property) { - if (UtilValidate.isNotEmpty((file)) return DEFAULT_BD_SCALE; - if (UtilValidate.isNotEmpty((property)) return DEFAULT_BD_SCALE; + if (UtilValidate.isEmpty(file)) return DEFAULT_BD_SCALE; + if (UtilValidate.isEmpty(property)) return DEFAULT_BD_SCALE; int scale = -1; String value = UtilProperties.getPropertyValue(file, property); @@ -75,8 +75,8 @@ * @return int - Rounding mode to pass to BigDecimal's methods. Defaults to DEFAULT_BD_ROUNDING_MODE (BigDecimal.ROUND_HALF_UP) */ public static int getBigDecimalRoundingMode(String file, String property) { - if (UtilValidate.isNotEmpty(file)) return DEFAULT_BD_SCALE; - if (UtilValidate.isNotEmpty(property)) return DEFAULT_BD_ROUNDING_MODE; + if (UtilValidate.isEmpty(file)) return DEFAULT_BD_SCALE; + if (UtilValidate.isEmpty(property)) return DEFAULT_BD_ROUNDING_MODE; String value = UtilProperties.getPropertyValue(file, property); int mode = roundingModeFromString(value); Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java Sat Nov 28 13:59:45 2009 @@ -91,9 +91,7 @@ } // if fieldVal is null, or has zero length, use defaultVal - if (UtilValidate.isNotEmpty((fieldVal)) { - fieldVal = defaultVal; - } + if (UtilValidate.isEmpty(fieldVal)) fieldVal = defaultVal; if (!mapAcsr.isEmpty()) { Map<String, Object> fromMap = mapAcsr.get(methodContext); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java Sat Nov 28 13:59:45 2009 @@ -198,7 +198,7 @@ // do something with the errorMessage if (UtilValidate.isNotEmpty(errorMessage)) { - if (UtilValidate.isEmpty((String) result.get(ModelService.ERROR_MESSAGE))) { + if (UtilValidate.isEmpty(result.get(ModelService.ERROR_MESSAGE))) { result.put(ModelService.ERROR_MESSAGE, errorMessage); } else { List<Object> origErrorMessageList = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST)); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java?rev=885092&r1=885091&r2=885092&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java Sat Nov 28 13:59:45 2009 @@ -330,7 +330,7 @@ } // get the success messages - if (!UtilValidate.isEmpty((String)result.get(ModelService.SUCCESS_MESSAGE))) { + if (!UtilValidate.isEmpty(result.get(ModelService.SUCCESS_MESSAGE))) { String newSuccessMessage = (String)result.get(ModelService.SUCCESS_MESSAGE); if (!successMessages.contains(newSuccessMessage)) { successMessages.add(newSuccessMessage); |
Free forum by Nabble | Edit this page |