Author: jleroux
Date: Sat Nov 28 17:19:33 2009
New Revision: 885116

URL: http://svn.apache.org/viewvc?rev=885116&view=rev
Log:
More uses of is(Not)Empty (certainly last)

Modified:
    
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
    
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java

Modified: 
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=885116&r1=885115&r2=885116&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
 Sat Nov 28 17:19:33 2009
@@ -30,6 +30,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
@@ -67,9 +68,9 @@
         List listRoutingTask = null;
         List constraints = new LinkedList();
 
-        if (workEffortName != null && workEffortName.length()>0)
+        if (UtilValidate.isNotEmpty(workEffortName))
             constraints.add(EntityCondition.makeCondition("workEffortName", 
EntityOperator.GREATER_THAN_EQUAL_TO, workEffortName));
-        if (fixedAssetId != null && fixedAssetId.length()>0 && ! 
"ANY".equals(fixedAssetId))
+        if (UtilValidate.isNotEmpty(fixedAssetId) && ! 
"ANY".equals(fixedAssetId))
             constraints.add(EntityCondition.makeCondition("fixedAssetId", 
EntityOperator.EQUALS, fixedAssetId));
 
         constraints.add(EntityCondition.makeCondition("currentStatusId", 
EntityOperator.EQUALS, "ROU_ACTIVE"));

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=885116&r1=885115&r2=885116&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
 Sat Nov 28 17:19:33 2009
@@ -566,7 +566,7 @@
                 GenericValue orderItem = (GenericValue) iter.next();
                 String shoppingListId = orderItem.getString("shoppingListId");
                 String shoppingListItemSeqId = 
orderItem.getString("shoppingListItemSeqId");
-                if ((shoppingListId != null) && (shoppingListId.length() > 0)) 
{
+                if (UtilValidate.isNotEmpty(shoppingListId)) {
                     GenericValue 
shoppingListItem=delegator.findByPrimaryKey("ShoppingListItem", 
UtilMisc.toMap("shoppingListId",
                                 shoppingListId, "shoppingListItemSeqId", 
shoppingListItemSeqId));
                     if (shoppingListItem != null) {


Reply via email to