svn commit: r686591 [2/3] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/ applications/content/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r686591 [2/3] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/ applications/content/...

jleroux@apache.org
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java Sun Aug 17 00:47:18 2008
@@ -262,7 +262,7 @@
 
         List prodCatalogCategories = getProdCatalogCategories(request, prodCatalogId, "PCCT_BROWSE_ROOT");
 
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             GenericValue prodCatalogCategory = EntityUtil.getFirst(prodCatalogCategories);
 
             return prodCatalogCategory.getString("productCategoryId");
@@ -282,7 +282,7 @@
         if (prodCatalogId == null || prodCatalogId.length() <= 0) return null;
 
         List prodCatalogCategories = getProdCatalogCategories(delegator, prodCatalogId, "PCCT_SEARCH");
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             GenericValue prodCatalogCategory = EntityUtil.getFirst(prodCatalogCategories);
             return prodCatalogCategory.getString("productCategoryId");
         } else {
@@ -294,7 +294,7 @@
         if (prodCatalogId == null || prodCatalogId.length() <= 0) return null;
 
         List prodCatalogCategories = getProdCatalogCategories(delegator, prodCatalogId, "PCCT_VIEW_ALLW");
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             GenericValue prodCatalogCategory = EntityUtil.getFirst(prodCatalogCategories);
             return prodCatalogCategory.getString("productCategoryId");
         } else {
@@ -306,7 +306,7 @@
         if (prodCatalogId == null || prodCatalogId.length() <= 0) return null;
 
         List prodCatalogCategories = getProdCatalogCategories(delegator, prodCatalogId, "PCCT_PURCH_ALLW");
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             GenericValue prodCatalogCategory = EntityUtil.getFirst(prodCatalogCategories);
             return prodCatalogCategory.getString("productCategoryId");
         } else {
@@ -323,7 +323,7 @@
 
         List prodCatalogCategories = getProdCatalogCategories(request, prodCatalogId, "PCCT_PROMOTIONS");
 
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             GenericValue prodCatalogCategory = EntityUtil.getFirst(prodCatalogCategories);
 
             return prodCatalogCategory.getString("productCategoryId");
@@ -361,7 +361,7 @@
 
         List prodCatalogCategories = getProdCatalogCategories(request, prodCatalogId, "PCCT_QUICK_ADD");
 
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             GenericValue prodCatalogCategory = EntityUtil.getFirst(prodCatalogCategories);
 
             return prodCatalogCategory.getString("productCategoryId");
@@ -381,7 +381,7 @@
 
         Collection prodCatalogCategories = getProdCatalogCategories(request, prodCatalogId, "PCCT_QUICK_ADD");
 
-        if (prodCatalogCategories != null && prodCatalogCategories.size() > 0) {
+        if (UtilValidate.isNotEmpty(prodCatalogCategories)) {
             Iterator pccIter = prodCatalogCategories.iterator();
 
             while (pccIter.hasNext()) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Sun Aug 17 00:47:18 2008
@@ -262,7 +262,7 @@
                     }
 
                     // filter out the view allow before getting the sublist
-                    if (viewProductCategoryId != null && productCategoryMembers.size() > 0) {
+                    if (UtilValidate.isNotEmpty(viewProductCategoryId)) {
                         productCategoryMembers = CategoryWorker.filterProductsInCategory(delegator, productCategoryMembers, viewProductCategoryId);
                         listSize = productCategoryMembers.size();
                     }
@@ -321,7 +321,7 @@
                         }
                     } else {
                         productCategoryMembers = pli.getCompleteList();
-                        if (viewProductCategoryId != null && productCategoryMembers.size() > 0) {
+                        if (UtilValidate.isNotEmpty(viewProductCategoryId)) {
                             // fiter out the view allow
                             productCategoryMembers = CategoryWorker.filterProductsInCategory(delegator, productCategoryMembers, viewProductCategoryId);
                         }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Sun Aug 17 00:47:18 2008
@@ -176,7 +176,7 @@
             Debug.logWarning(e.getMessage(), module);
             rollups = null;
         }
-        if (rollups != null && rollups.size() > 0) {
+        if (UtilValidate.isNotEmpty(rollups)) {
             // Debug.log("Rollup size: " + rollups.size(), module);
             Iterator ri = rollups.iterator();
 
@@ -387,7 +387,7 @@
     public static String lastTrailItem(ServletRequest request) {
         List crumb = getTrail(request);
 
-        if (crumb != null && crumb.size() > 0) {
+        if (UtilValidate.isNotEmpty(crumb)) {
             return (String) crumb.get(crumb.size() - 1);
         } else {
             return null;
@@ -405,7 +405,7 @@
             GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId));
             List productAssocs = ProductWorker.getVariantVirtualAssocs(product);
             //this does take into account that a product could be a variant of multiple products, but this shouldn't ever really happen...
-            if (productAssocs != null && productAssocs.size() > 0) {
+            if (UtilValidate.isNotEmpty(productAssocs)) {
                 Iterator pasIter = productAssocs.iterator();
                 while (pasIter.hasNext()) {
                     GenericValue productAssoc = (GenericValue) pasIter.next();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Sun Aug 17 00:47:18 2008
@@ -138,7 +138,7 @@
         if (UtilValidate.isNotEmpty(configId)) {
             this.configId = configId;
             List productConfigConfig = delegator.findByAnd("ProductConfigConfig", UtilMisc.toMap("configId", configId));
-            if (productConfigConfig != null && productConfigConfig.size() > 0) {
+            if (UtilValidate.isNotEmpty(productConfigConfig)) {
                 Iterator pccIt = productConfigConfig.iterator();
                 while (pccIt.hasNext()) {
                     GenericValue pcc =(GenericValue) pccIt.next();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Sun Aug 17 00:47:18 2008
@@ -653,7 +653,7 @@
         Double availableToPromiseTotal = new Double(0);
         Double quantityOnHandTotal = new Double(0);
         
-        if (productAssocList != null && productAssocList.size() > 0) {
+        if (UtilValidate.isNotEmpty(productAssocList)) {
            // minimum QOH and ATP encountered
            double minQuantityOnHandTotal = Double.MAX_VALUE;
            double minAvailableToPromiseTotal = Double.MAX_VALUE;

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Sun Aug 17 00:47:18 2008
@@ -300,7 +300,7 @@
         }
 
         // if any of these prices is missing and this product is a variant, default to the corresponding price on the virtual product
-        if (virtualProductPrices != null && virtualProductPrices.size() > 0) {
+        if (UtilValidate.isNotEmpty(virtualProductPrices)) {
             if (listPriceValue == null) {
                 List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE"));
                 listPriceValue = EntityUtil.getFirst(virtualTempPrices);
@@ -741,7 +741,7 @@
             // for we will always include any rules that go by category, shouldn't be too many to iterate through each time and will save on cache entries
             // note that we always want to put the category, quantity, etc ones that find all rules with these conditions in separate cache lists so that they can be easily cleared
             Collection productCategoryIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PROD_CAT_ID"));
-            if (productCategoryIdConds != null && productCategoryIdConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(productCategoryIdConds)) {
                 Iterator productCategoryIdCondsIter = productCategoryIdConds.iterator();
                 while (productCategoryIdCondsIter.hasNext()) {
                     GenericValue productCategoryIdCond = (GenericValue) productCategoryIdCondsIter.next();
@@ -751,7 +751,7 @@
 
             // by productFeatureId
             Collection productFeatureIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PROD_FEAT_ID"));
-            if (productFeatureIdConds != null && productFeatureIdConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(productFeatureIdConds)) {
                 Iterator productFeatureIdCondsIter = productFeatureIdConds.iterator();
                 while (productFeatureIdCondsIter.hasNext()) {
                     GenericValue productFeatureIdCond = (GenericValue) productFeatureIdCondsIter.next();
@@ -763,7 +763,7 @@
             // we could say that all rules with quantity on them must have one of these other values
             // but, no we'll do it the other way, any that have a quantity will always get compared
             Collection quantityConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_QUANTITY"));
-            if (quantityConds != null && quantityConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(quantityConds)) {
                 Iterator quantityCondsIter = quantityConds.iterator();
                 while (quantityCondsIter.hasNext()) {
                     GenericValue quantityCond = (GenericValue) quantityCondsIter.next();
@@ -773,7 +773,7 @@
 
             // by roleTypeId
             Collection roleTypeIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_ROLE_TYPE"));
-            if (roleTypeIdConds != null && roleTypeIdConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(roleTypeIdConds)) {
                 Iterator roleTypeIdCondsIter = roleTypeIdConds.iterator();
                 while (roleTypeIdCondsIter.hasNext()) {
                     GenericValue roleTypeIdCond = (GenericValue) roleTypeIdCondsIter.next();
@@ -787,7 +787,7 @@
 
             // by listPrice
             Collection listPriceConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_LIST_PRICE"));
-            if (listPriceConds != null && listPriceConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(listPriceConds)) {
                 Iterator listPriceCondsIter = listPriceConds.iterator();
                 while (listPriceCondsIter.hasNext()) {
                     GenericValue listPriceCond = (GenericValue) listPriceCondsIter.next();
@@ -799,7 +799,7 @@
 
             // by productId
             Collection productIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PRODUCT_ID", "condValue", productId));
-            if (productIdConds != null && productIdConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(productIdConds)) {
                 Iterator productIdCondsIter = productIdConds.iterator();
                 while (productIdCondsIter.hasNext()) {
                     GenericValue productIdCond = (GenericValue) productIdCondsIter.next();
@@ -810,7 +810,7 @@
             // by virtualProductId, if not null
             if (virtualProductId != null) {
                 Collection virtualProductIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PRODUCT_ID", "condValue", virtualProductId));
-                if (virtualProductIdConds != null && virtualProductIdConds.size() > 0) {
+                if (UtilValidate.isNotEmpty(virtualProductIdConds)) {
                     Iterator virtualProductIdCondsIter = virtualProductIdConds.iterator();
                     while (virtualProductIdCondsIter.hasNext()) {
                         GenericValue virtualProductIdCond = (GenericValue) virtualProductIdCondsIter.next();
@@ -822,7 +822,7 @@
             // by prodCatalogId - which is optional in certain cases
             if (UtilValidate.isNotEmpty(prodCatalogId)) {
                 Collection prodCatalogIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PROD_CLG_ID", "condValue", prodCatalogId));
-                if (prodCatalogIdConds != null && prodCatalogIdConds.size() > 0) {
+                if (UtilValidate.isNotEmpty(prodCatalogIdConds)) {
                     Iterator prodCatalogIdCondsIter = prodCatalogIdConds.iterator();
                     while (prodCatalogIdCondsIter.hasNext()) {
                         GenericValue prodCatalogIdCond = (GenericValue) prodCatalogIdCondsIter.next();
@@ -834,7 +834,7 @@
             // by productStoreGroupId
             if (UtilValidate.isNotEmpty(productStoreGroupId)) {
                 Collection storeGroupConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PROD_SGRP_ID", "condValue", productStoreGroupId));
-                if (storeGroupConds != null && storeGroupConds.size() > 0) {
+                if (UtilValidate.isNotEmpty(storeGroupConds)) {
                     Iterator storeGroupCondsIter = storeGroupConds.iterator();
                     while (storeGroupCondsIter.hasNext()) {
                         GenericValue storeGroupCond = (GenericValue) storeGroupCondsIter.next();
@@ -846,7 +846,7 @@
             // by webSiteId
             if (UtilValidate.isNotEmpty(webSiteId)) {
                 Collection webSiteIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_WEBSITE_ID", "condValue", webSiteId));
-                if (webSiteIdConds != null && webSiteIdConds.size() > 0) {
+                if (UtilValidate.isNotEmpty(webSiteIdConds)) {
                     Iterator webSiteIdCondsIter = webSiteIdConds.iterator();
                     while (webSiteIdCondsIter.hasNext()) {
                         GenericValue webSiteIdCond = (GenericValue) webSiteIdCondsIter.next();
@@ -858,7 +858,7 @@
             // by partyId
             if (UtilValidate.isNotEmpty(partyId)) {
                 Collection partyIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_PARTY_ID", "condValue", partyId));
-                if (partyIdConds != null && partyIdConds.size() > 0) {
+                if (UtilValidate.isNotEmpty(partyIdConds)) {
                     Iterator partyIdCondsIter = partyIdConds.iterator();
                     while (partyIdCondsIter.hasNext()) {
                         GenericValue partyIdCond = (GenericValue) partyIdCondsIter.next();
@@ -869,7 +869,7 @@
 
             // by currencyUomId
             Collection currencyUomIdConds = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("inputParamEnumId", "PRIP_CURRENCY_UOMID", "condValue", currencyUomId));
-            if (currencyUomIdConds != null && currencyUomIdConds.size() > 0) {
+            if (UtilValidate.isNotEmpty(currencyUomIdConds)) {
                 Iterator currencyUomIdCondsIter = currencyUomIdConds.iterator();
                 while (currencyUomIdCondsIter.hasNext()) {
                     GenericValue currencyUomIdCond = (GenericValue) currencyUomIdCondsIter.next();
@@ -1171,7 +1171,7 @@
             // and from/thru date within range
             productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, nowTimestamp, null, null, true);
             // then 0 (equals), otherwise 1 (not equals)
-            if (productCategoryMembers != null && productCategoryMembers.size() > 0) {
+            if (UtilValidate.isNotEmpty(productCategoryMembers)) {
                 compare = 0;
             } else {
                 compare = 1;
@@ -1185,7 +1185,7 @@
                         UtilMisc.toMap("productId", virtualProductId, "productCategoryId", productCategoryId));
                 // and from/thru date within range
                 virtualProductCategoryMembers = EntityUtil.filterByDate(virtualProductCategoryMembers, nowTimestamp, null, null, true);
-                if (virtualProductCategoryMembers != null && virtualProductCategoryMembers.size() > 0) {
+                if (UtilValidate.isNotEmpty(virtualProductCategoryMembers)) {
                     // we found a member record? great, then this condition is satisfied
                     compare = 0;
                 }
@@ -1200,7 +1200,7 @@
             // and from/thru date within range
             productFeatureAppls = EntityUtil.filterByDate(productFeatureAppls, nowTimestamp, null, null, true);
             // then 0 (equals), otherwise 1 (not equals)
-            if (productFeatureAppls != null && productFeatureAppls.size() > 0) {
+            if (UtilValidate.isNotEmpty(productFeatureAppls)) {
                 compare = 0;
             } else {
                 compare = 1;
@@ -1251,14 +1251,14 @@
                     // and from/thru date within range
                     partyRelationshipList = EntityUtil.filterByDate(partyRelationshipList, nowTimestamp, null, null, true);
                     // then 0 (equals), otherwise 1 (not equals)
-                    if (partyRelationshipList != null && partyRelationshipList.size() > 0) {
+                    if (UtilValidate.isNotEmpty(partyRelationshipList)) {
                         compare = 0;
                     } else {
                         // before setting 1 try one more query: look for a 2 hop relationship
                         List partyRelationshipTwoHopList = delegator.findByAndCache("PartyRelationshipToFrom", UtilMisc.toMap("onePartyIdFrom", groupPartyId, "twoPartyIdTo", partyId, "onePartyRelationshipTypeId", "GROUP_ROLLUP", "twoPartyRelationshipTypeId", "GROUP_ROLLUP"));
                         partyRelationshipTwoHopList = EntityUtil.filterByDate(partyRelationshipTwoHopList, nowTimestamp, "oneFromDate", "oneThruDate", true);
                         partyRelationshipTwoHopList = EntityUtil.filterByDate(partyRelationshipTwoHopList, nowTimestamp, "twoFromDate", "twoThruDate", true);
-                        if (partyRelationshipTwoHopList != null && partyRelationshipTwoHopList.size() > 0) {
+                        if (UtilValidate.isNotEmpty(partyRelationshipTwoHopList)) {
                             compare = 0;
                         } else {
                             compare = 1;
@@ -1276,7 +1276,7 @@
                 // and from/thru date within range
                 partyClassificationList = EntityUtil.filterByDate(partyClassificationList, nowTimestamp, null, null, true);
                 // then 0 (equals), otherwise 1 (not equals)
-                if (partyClassificationList != null && partyClassificationList.size() > 0) {
+                if (UtilValidate.isNotEmpty(partyClassificationList)) {
                     compare = 0;
                 } else {
                     compare = 1;

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Sun Aug 17 00:47:18 2008
@@ -91,7 +91,7 @@
             productSearchConstraintList.add(new KeywordConstraint(keywordsString, anyPrefix, anySuffix, null, isAnd));
         }
 
-        if (featureIdSet != null && featureIdSet.size() > 0) {
+        if (UtilValidate.isNotEmpty(featureIdSet)) {
             Iterator featureIdIter = featureIdSet.iterator();
             while (featureIdIter.hasNext()) {
                 String productFeatureId = (String) featureIdIter.next();
@@ -2141,7 +2141,7 @@
         }
 
         // Features
-        if (featureIdSet != null && featureIdSet.size() > 0) {
+        if (UtilValidate.isNotEmpty(featureIdSet)) {
             Iterator featureIdIter = featureIdSet.iterator();
             while (featureIdIter.hasNext()) {
                 String productFeatureId = (String) featureIdIter.next();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Sun Aug 17 00:47:18 2008
@@ -462,7 +462,7 @@
 
         List productSearchConstraintList = ProductSearchSession.ProductSearchOptions.getConstraintList(session);
         // if no constraints, don't do a search...
-        if (productSearchConstraintList != null && productSearchConstraintList.size() > 0) {
+        if (UtilValidate.isNotEmpty(productSearchConstraintList)) {
             ResultSortOrder resultSortOrder = ProductSearchSession.ProductSearchOptions.getResultSortOrder(request);
             ProductSearchSession.checkSaveSearchOptionsHistory(session);
             ProductSearchContext productSearchContext = new ProductSearchContext(delegator, visitId);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Sun Aug 17 00:47:18 2008
@@ -393,7 +393,7 @@
                     Debug.logError(e, "Error reading ProductStoreKeywordOvrd list, not doing keyword override", module);
                 }
 
-                if (productStoreKeywordOvrdList != null && productStoreKeywordOvrdList.size() > 0) {
+                if (UtilValidate.isNotEmpty(productStoreKeywordOvrdList)) {
                     Iterator productStoreKeywordOvrdIter = productStoreKeywordOvrdList.iterator();
                     while (productStoreKeywordOvrdIter.hasNext()) {
                         GenericValue productStoreKeywordOvrd = (GenericValue) productStoreKeywordOvrdIter.next();
@@ -872,7 +872,7 @@
         String visitId = VisitHandler.getVisitId(session);
         List productSearchConstraintList = ProductSearchOptions.getConstraintList(session);
         // if no constraints, don't do a search...
-        if (productSearchConstraintList != null && productSearchConstraintList.size() > 0) {
+        if (UtilValidate.isNotEmpty(productSearchConstraintList)) {
             // if the search options have changed since the last search, put at the beginning of the options history list
             checkSaveSearchOptionsHistory(session);
 

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=686591&r1=686590&r2=686591&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 Sun Aug 17 00:47:18 2008
@@ -462,8 +462,8 @@
             }
             // filter the list by date
             productAssocs = EntityUtil.filterByDate(productAssocs);
-            // first check to see if there is a view allow category and if these producta are in it...
-            if (checkViewAllow && prodCatalogId != null && productAssocs != null && productAssocs.size() > 0) {
+            // first check to see if there is a view allow category and if these products are in it...
+            if (checkViewAllow && prodCatalogId != null && UtilValidate.isNotEmpty(productAssocs)) {
                 String viewProductCategoryId = CatalogWorker.getCatalogViewAllowCategoryId(delegator, prodCatalogId);
                 if (viewProductCategoryId != null) {
                     if (productIdTo == null) {
@@ -587,7 +587,7 @@
             Object key = groupIterator.next();
             List itemList = (List) group.get(key);
 
-            if (itemList != null && itemList.size() > 0) {
+            if (UtilValidate.isNotEmpty(itemList)) {
                 Map subGroup = makeGroup(delegator, featureList, itemList, order, index + 1);
                 group.put(key, subGroup);
             } else {

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=686591&r1=686590&r2=686591&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 Sun Aug 17 00:47:18 2008
@@ -399,7 +399,7 @@
             if (alternativeOptionProduct != null) {
                 if ("Y".equals(alternativeOptionProduct.getString("isVariant"))) {
                     Set distFeatures = getVariantDistinguishingFeatures(alternativeOptionProduct);
-                    if (distFeatures != null && distFeatures.size() > 0) {
+                    if (UtilValidate.isNotEmpty(distFeatures)) {
                         // Debug.logInfo("Found distinguishing features: " + distFeatures, module);
                         
                         StringBuffer nameBuf = new StringBuffer();
@@ -590,7 +590,7 @@
     public static double calcOrderAdjustments(List orderHeaderAdjustments, double subTotal, boolean includeOther, boolean includeTax, boolean includeShipping) {
         double adjTotal = 0.0;
 
-        if (orderHeaderAdjustments != null && orderHeaderAdjustments.size() > 0) {
+        if (UtilValidate.isNotEmpty(orderHeaderAdjustments)) {
             List filteredAdjs = filterOrderAdjustments(orderHeaderAdjustments, includeOther, includeTax, includeShipping, false, false);
             Iterator adjIt = filteredAdjs.iterator();
 
@@ -618,7 +618,7 @@
     public static List filterOrderAdjustments(List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) {
         List newOrderAdjustmentsList = new LinkedList();
 
-        if (adjustments != null && adjustments.size() > 0) {
+        if (UtilValidate.isNotEmpty(adjustments)) {
             Iterator adjIt = adjustments.iterator();
 
             while (adjIt.hasNext()) {

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=686591&r1=686590&r2=686591&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 Sun Aug 17 00:47:18 2008
@@ -700,7 +700,7 @@
                 return false;
             }
 
-            if (productFacilities != null && productFacilities.size() > 0) {
+            if (UtilValidate.isNotEmpty(productFacilities)) {
                 Iterator pfIter = productFacilities.iterator();
 
                 while (pfIter.hasNext()) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Sun Aug 17 00:47:18 2008
@@ -28,6 +28,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.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
@@ -129,7 +130,7 @@
         Collection features = (Collection) context.get("productFeatures");
 
         try {
-            if (partyId != null && features != null && features.size() > 0) {
+            if (partyId != null && UtilValidate.isNotEmpty(features)) {
                 // loop through all the features, find the related SupplierProductFeature for the given partyId, and
                 // substitue description and idCode
                 for (Iterator fI = features.iterator(); fI.hasNext(); ) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Sun Aug 17 00:47:18 2008
@@ -803,7 +803,7 @@
                 currentRoles = EntityUtil.filterByDate(currentRoles);
 
                 // if not; create the role
-                if (currentRoles != null && currentRoles.size() > 0) {
+                if (UtilValidate.isNotEmpty(currentRoles)) {
                     ctx.put("userLogin", userLogin);
                     Map addRole = this.getDispatcher().runSync("createPicklistRole", ctx);
                     if (ServiceUtil.isError(addRole)) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Sun Aug 17 00:47:18 2008
@@ -397,7 +397,7 @@
                 // add the feature quantities
                 Double quantity = (Double) itemMap.get("quantity");
                 Set featureSet = (Set) itemMap.get("featureSet");
-                if (featureSet != null && featureSet.size() > 0) {
+                if (UtilValidate.isNotEmpty(featureSet)) {
                     Iterator fi = featureSet.iterator();
                     while (fi.hasNext()) {
                         String featureId = (String) fi.next();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Sun Aug 17 00:47:18 2008
@@ -342,7 +342,7 @@
                 "Charge");
 
         List chargeList = new ArrayList();
-        if (chargeNodeList != null && chargeNodeList.size() > 0) {
+        if (UtilValidate.isNotEmpty(chargeNodeList)) {
             for (int i = 0; chargeNodeList.size() > i; i++) {
                 Map charge = new HashMap();
 

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java Sun Aug 17 00:47:18 2008
@@ -27,6 +27,7 @@
 
 import javolution.util.FastMap;
 
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.webapp.stats.VisitHandler;
 import org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder;
@@ -68,7 +69,7 @@
         String visitId = VisitHandler.getVisitId(session);
         List<WorkEffortSearchConstraint> workEffortSearchConstraintList = WorkEffortSearchOptions.getConstraintList(session);
         // if no constraints, don't do a search...
-        if (workEffortSearchConstraintList != null && workEffortSearchConstraintList.size() > 0) {
+        if (UtilValidate.isNotEmpty(workEffortSearchConstraintList)) {
             // if the search options have changed since the last search, put at the beginning of the options history list
             WorkEffortSearchSession.checkSaveSearchOptionsHistory(session);
 

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Sun Aug 17 00:47:18 2008
@@ -346,7 +346,7 @@
         if (UtilValidate.isNotEmpty(workEffortTypeId)) {
             typesList.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, workEffortTypeId));
         }        
-        if (partyIds != null && partyIds.size() > 0) {
+        if (UtilValidate.isNotEmpty(partyIds)) {
             entityExprList.add(EntityCondition.makeCondition("partyId", EntityOperator.IN, partyIds));
         }
         if (UtilValidate.isNotEmpty(facilityId)) {
@@ -488,7 +488,7 @@
         if (partyIdsToUse.size() > 0 || UtilValidate.isNotEmpty(facilityId) || UtilValidate.isNotEmpty(fixedAssetId)) {
             try {
                 List<GenericValue> tempWorkEfforts = null;
-                if (partyIds != null && partyIds.size() > 0) {
+                if (UtilValidate.isNotEmpty(partyIds)) {
                     tempWorkEfforts = EntityUtil.filterByDate(delegator.findList("WorkEffortAndPartyAssign", ecl, null, UtilMisc.toList("estimatedStartDate"), null, false));
                 } else {
                     tempWorkEfforts = delegator.findList("WorkEffort", ecl, null, UtilMisc.toList("estimatedStartDate"), null, false);

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java Sun Aug 17 00:47:18 2008
@@ -747,7 +747,7 @@
 
             // load the virtual hosts
             List<? extends Element> virtHostList = UtilXml.childElementList(element, "virtual-host");
-            if (virtHostList != null && virtHostList.size() > 0) {
+            if (UtilValidate.isNotEmpty(virtHostList)) {
                 for (Element e: virtHostList) {
                     virtualHosts.add(e.getAttribute("host-name"));
                 }
@@ -755,7 +755,7 @@
 
             // load the init parameters
             List<? extends Element> initParamList = UtilXml.childElementList(element, "init-param");
-            if (initParamList != null && initParamList.size() > 0) {
+            if (UtilValidate.isNotEmpty(initParamList)) {
                 for (Element e: virtHostList) {
                     this.initParameters.put(e.getAttribute("name"), e.getAttribute("value"));
                 }

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java Sun Aug 17 00:47:18 2008
@@ -20,7 +20,6 @@
 
 import java.io.IOException;
 import java.net.URL;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
@@ -29,6 +28,7 @@
 
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilURL;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.w3c.dom.Document;
@@ -83,7 +83,7 @@
 
         Element root = document.getDocumentElement();
         List<? extends Element> toLoad = UtilXml.childElementList(root);
-        if (toLoad != null && toLoad.size() > 0) {
+        if (UtilValidate.isNotEmpty(toLoad)) {
             componentsFromConfig = new LinkedList<ComponentDef>();
             for (Element element: toLoad) {
                 componentsFromConfig.add(new ComponentDef(element));

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java Sun Aug 17 00:47:18 2008
@@ -202,7 +202,7 @@
 
         public List<Property> getPropertiesWithValue(String value) {
             List<Property> props = new LinkedList<Property>();
-            if (properties != null && properties.size() > 0) {
+            if (UtilValidate.isNotEmpty(properties)) {
                 for (Property p: properties.values()) {
                     if (p != null && value.equals(p.value)) {
                         props.add(p);
@@ -237,7 +237,7 @@
 
             public List<Property> getPropertiesWithValue(String value) {
                 List<Property> props = new LinkedList<Property>();
-                if (properties != null && properties.size() > 0) {
+                if (UtilValidate.isNotEmpty(properties)) {
                     for (Property p: properties.values()) {
                         if (p != null && value.equals(p.value)) {
                             props.add(p);

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java Sun Aug 17 00:47:18 2008
@@ -399,7 +399,7 @@
 
         if (rawStream != null) {
             arguments = rawStream;
-        } else if (parameters != null && parameters.size() > 0) {
+        } else if (UtilValidate.isNotEmpty(parameters)) {
             arguments = UtilHttp.urlEncodeArgs(parameters, false);
         }
 
@@ -453,7 +453,7 @@
                 if (Debug.verboseOn() || debug) Debug.log("Header - Authorization: " + basicAuthString, module);
             }
             
-            if (headers != null && headers.size() > 0) {
+            if (UtilValidate.isNotEmpty(headers)) {
                 for (Map.Entry<String, String> entry: headers.entrySet()) {
                     String headerName = entry.getKey();
                     String headerValue = entry.getValue();

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Sun Aug 17 00:47:18 2008
@@ -166,7 +166,7 @@
         if (paramMap.size() == 0) {
             // nothing found in the parameters; maybe we read the stream instead
             Map<String, Object> multiPartMap = UtilGenerics.checkMap(request.getAttribute("multiPartMap"));
-            if (multiPartMap != null && multiPartMap.size() > 0) {
+            if (UtilValidate.isNotEmpty(multiPartMap)) {
                 paramMap.putAll(multiPartMap);
             }
         }

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java Sun Aug 17 00:47:18 2008
@@ -430,7 +430,7 @@
         if (value == null || value.length() == 0) {
             return "";
         } else {
-            if (arguments != null && arguments.size() > 0) {
+            if (UtilValidate.isNotEmpty(arguments)) {
                 value = MessageFormat.format(value, arguments.toArray());
             }
             return value;
@@ -455,7 +455,7 @@
         if (value == null || value.length() == 0) {
             return "";
         } else {
-            if (context != null && context.size() > 0) {
+            if (UtilValidate.isNotEmpty(context)) {
                 value = FlexibleStringExpander.expandString(value, context, locale);
             }
             return value;

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLineTable.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLineTable.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLineTable.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLineTable.java Sun Aug 17 00:47:18 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -33,6 +32,7 @@
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.ObjectType;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.collections.LRUMap;
 
 
@@ -235,7 +235,7 @@
     }
 
     public synchronized void clear() {
-        if (fileTable != null && this.size() > 0) {
+        if (UtilValidate.isNotEmpty(fileTable)) {
             try {
                 // remove this table
                 long recid = fileTable.getRecid();

Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Sun Aug 17 00:47:18 2008
@@ -282,7 +282,7 @@
             throw new ContainerException("Only one cluster configuration allowed per engine");
         }
 
-        if (clusterProps != null && clusterProps.size() > 0) {
+        if (UtilValidate.isNotEmpty(clusterProps)) {
             ContainerConfig.Container.Property clusterProp = clusterProps.get(0);
             createCluster(clusterProp, host);
             clusterConfig.put(engineName, clusterProp);
@@ -464,7 +464,7 @@
         }
 
         Connector connector = null;
-        if (connectorProp.properties != null && connectorProp.properties.size() > 0) {
+        if (UtilValidate.isNotEmpty(connectorProp.properties)) {
             connector = embedded.createConnector(address, port, protocol);
             try {
                 for (ContainerConfig.Container.Property prop: connectorProp.properties.values()) {
@@ -621,7 +621,7 @@
 
     protected void configureMimeTypes(Context context) throws ContainerException {
         Map<String, String> mimeTypes = CatalinaContainer.getMimeTypes();
-        if (mimeTypes != null && mimeTypes.size() > 0) {
+        if (UtilValidate.isNotEmpty(mimeTypes)) {
             for (Map.Entry<String, String> entry: mimeTypes.entrySet()) {
                 context.addMimeMapping(entry.getKey(), entry.getValue());
             }
@@ -629,7 +629,7 @@
     }
 
     protected static synchronized Map<String, String> getMimeTypes() throws ContainerException {
-        if (mimeTypes != null && mimeTypes.size() > 0) {
+        if (UtilValidate.isNotEmpty(mimeTypes)) {
             return mimeTypes;
         }
 

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java Sun Aug 17 00:47:18 2008
@@ -32,6 +32,8 @@
 import org.apache.log4j.Logger;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilValidate;
+
 import static org.ofbiz.base.util.UtilGenerics.checkList;
 import static org.ofbiz.base.util.UtilGenerics.checkMap;
 import org.ofbiz.base.util.UtilMisc;
@@ -321,7 +323,7 @@
 
     public static Map<String, Object> displayXaDebugInfo(DispatchContext dctx, Map<String, ?> context) {
         if (TransactionUtil.debugResources) {
-            if (TransactionUtil.debugResMap != null && TransactionUtil.debugResMap.size() > 0) {
+            if (UtilValidate.isNotEmpty(TransactionUtil.debugResMap)) {
                 TransactionUtil.logRunningTx();
             } else {
                 Debug.log("No running transaction to display.", module);

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Sun Aug 17 00:47:18 2008
@@ -333,7 +333,7 @@
 
             // add to queryStringMap
             List<Object[]> origList = origValueMap.get(fieldName);
-            if (origList != null && origList.size() > 0) {
+            if (UtilValidate.isNotEmpty(origList)) {
                 for (Object[] arr: origList) {
                     queryStringMap.put((String) arr[0], arr[1]);
                 }

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/geo/GeoWorker.java Sun Aug 17 00:47:18 2008
@@ -18,21 +18,19 @@
  *******************************************************************************/
 package org.ofbiz.common.geo;
 
-import org.ofbiz.entity.GenericValue;
-import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.GenericDelegator;
-import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.Debug;
-
 import java.util.List;
-import java.util.LinkedList;
-import java.util.Iterator;
-import java.util.ArrayList;
 import java.util.Set;
 
 import javolution.util.FastList;
 import javolution.util.FastSet;
 
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+
 /**
  * Worker methods for Geos
  */
@@ -67,7 +65,7 @@
         } catch (GenericEntityException e) {
             Debug.logError(e, "Unable to get associated Geo GROUP_MEMBER relationship(s)", module);
         }
-        if (thisGeoAssoc != null && thisGeoAssoc.size() > 0) {
+        if (UtilValidate.isNotEmpty(thisGeoAssoc)) {
             for (GenericValue nextGeoAssoc: thisGeoAssoc) {
                 GenericValue nextGeo = null;
                 try {

Modified: ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile.java (original)
+++ ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile.java Sun Aug 17 00:47:18 2008
@@ -32,6 +32,7 @@
 import java.util.List;
 
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilValidate;
 
 
 /**
@@ -231,7 +232,7 @@
                 throw new DataFileException("Could not write to stream;", e);
             }
 
-            if (record.getChildRecords() != null && record.getChildRecords().size() > 0) {
+            if (UtilValidate.isNotEmpty(record.getChildRecords())) {
                 writeRecords(outStream, record.getChildRecords());
             }
         }

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java Sun Aug 17 00:47:18 2008
@@ -24,6 +24,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericModelException;
@@ -58,7 +59,7 @@
     }
 
     public void addSqlValue(StringBuilder sql, ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, List<? extends EntityCondition> conditionList, DatasourceInfo datasourceInfo) {
-        if (conditionList != null && conditionList.size() > 0) {
+        if (UtilValidate.isNotEmpty(conditionList)) {
             sql.append('(');
             Iterator<? extends EntityCondition> conditionIter = conditionList.iterator();
             while (conditionIter.hasNext()) {
@@ -91,7 +92,7 @@
     }
 
     public void visit(EntityConditionVisitor visitor, List<? extends EntityCondition> conditionList) {
-        if (conditionList != null && conditionList.size() > 0) {
+        if (UtilValidate.isNotEmpty(conditionList)) {
             for (EntityCondition condition: conditionList) {
                 visitor.visit(condition);
             }
@@ -136,7 +137,7 @@
     }
 
     public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map, List<? extends EntityCondition> conditionList) {
-        if (conditionList != null && conditionList.size() > 0) {
+        if (UtilValidate.isNotEmpty(conditionList)) {
             for (EntityCondition condition: conditionList) {
                 if (condition.mapMatches(delegator, map) == shortCircuitValue) return shortCircuitValue;
             }

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Sun Aug 17 00:47:18 2008
@@ -634,7 +634,7 @@
 
         // make two ArrayLists of fields, one for fields to select and the other for where clause fields (to find by)
         List<ModelField> selectFields = FastList.newInstance();
-        if (fieldsToSelect != null && fieldsToSelect.size() > 0) {
+        if (UtilValidate.isNotEmpty(fieldsToSelect)) {
             Set<String> tempKeys = FastSet.newInstance();
             tempKeys.addAll(fieldsToSelect);
             Iterator<ModelField> fieldIter = modelEntity.getFieldsIterator();

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java Sun Aug 17 00:47:18 2008
@@ -126,7 +126,7 @@
     
     public static Set<String> makeFieldsToSelect(List<FlexibleStringExpander> selectFieldExpanderList, Map<String, Object> context) {
         Set<String> fieldsToSelect = null;
-        if (selectFieldExpanderList != null && selectFieldExpanderList.size() > 0) {
+        if (UtilValidate.isNotEmpty(selectFieldExpanderList)) {
             fieldsToSelect = new HashSet<String>();
             for (FlexibleStringExpander selectFieldExpander: selectFieldExpanderList) {
                 fieldsToSelect.add(selectFieldExpander.expandString(context));
@@ -137,7 +137,7 @@
     
     public static List<String> makeOrderByFieldList(List<FlexibleStringExpander> orderByExpanderList, Map<String, Object> context) {
         List<String> orderByFields = null;
-        if (orderByExpanderList != null && orderByExpanderList.size() > 0) {
+        if (UtilValidate.isNotEmpty(orderByExpanderList)) {
             orderByFields = new LinkedList<String>();
             for (FlexibleStringExpander orderByExpander: orderByExpanderList) {
                 orderByFields.add(orderByExpander.expandString(context));

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java Sun Aug 17 00:47:18 2008
@@ -272,7 +272,7 @@
     public static String makeWhereClause(ModelEntity modelEntity, List modelFields, Map<String, Object> fields, String operator, String joinStyle) throws GenericEntityException {
         StringBuilder whereString = new StringBuilder("");
 
-        if (modelFields != null && modelFields.size() > 0) {
+        if (UtilValidate.isNotEmpty(modelFields)) {
             whereString.append(makeWhereStringFromFields(modelFields, fields, "AND"));
         }
 
@@ -370,7 +370,7 @@
         StringBuilder sql = new StringBuilder("");
         //String fieldPrefix = includeTablenamePrefix ? (modelEntity.getTableName(datasourceInfo) + ".") : "";
 
-        if (orderBy != null && orderBy.size() > 0) {
+        if (UtilValidate.isNotEmpty(orderBy)) {
             if (Debug.verboseOn()) Debug.logVerbose("Order by list contains: " + orderBy.size() + " entries.", module);
             OrderByList orderByList = new OrderByList(orderBy);
             orderByList.checkOrderBy(modelEntity);

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Sun Aug 17 00:47:18 2008
@@ -501,7 +501,7 @@
     public String getFirstPkFieldName() {
         List<String> pkFieldNames = this.getPkFieldNames();
         String idFieldName = null;
-        if (pkFieldNames != null && pkFieldNames.size() > 0) {
+        if (UtilValidate.isNotEmpty(pkFieldNames)) {
             idFieldName = pkFieldNames.get(0);
         }
         return idFieldName;

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Sun Aug 17 00:47:18 2008
@@ -689,7 +689,7 @@
             this.function = UtilXml.checkEmpty(aliasAllElement.getAttribute("function"));
             
             List<? extends Element> excludes = UtilXml.childElementList(aliasAllElement, "exclude");
-            if (excludes != null && excludes.size() > 0) {
+            if (UtilValidate.isNotEmpty(excludes)) {
                 this.fieldsToExclude = new HashSet<String>();
                 for (Element excludeElement: excludes) {
                     this.fieldsToExclude.add(excludeElement.getAttribute("field").intern());

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Sun Aug 17 00:47:18 2008
@@ -470,7 +470,7 @@
 
     public static void logRunningTx() {
         if (debugResources) {
-            if (debugResMap != null && debugResMap.size() > 0) {
+            if (UtilValidate.isNotEmpty(debugResMap)) {
                 for (DebugXaResource dxa: debugResMap.values()) {
                     dxa.log();
                 }
@@ -518,7 +518,7 @@
     }
     public static boolean suspendedTransactionsHeld() {
         List<Transaction> tl = suspendedTxStack.get();
-        if (tl != null && tl.size() > 0) {
+        if (UtilValidate.isNotEmpty(tl)) {
             return true;
         } else {
             return false;
@@ -536,7 +536,7 @@
     }
     protected static Transaction popSuspendedTransaction() {
         List<Transaction> tl = suspendedTxStack.get();
-        if (tl != null && tl.size() > 0) {
+        if (UtilValidate.isNotEmpty(tl)) {
             // restore the transaction start stamp
             popTransactionStartStamp();
             return tl.remove(0);
@@ -546,7 +546,7 @@
     }
     protected static void removeSuspendedTransaction(Transaction t) {
         List<Transaction> tl = suspendedTxStack.get();
-        if (tl != null && tl.size() > 0) {
+        if (UtilValidate.isNotEmpty(tl)) {
             tl.remove(t);
             popTransactionStartStamp(t);
         }
@@ -576,13 +576,13 @@
      // do the unofficial all threads Map one first, and don't do a real return
         Long curThreadId = Thread.currentThread().getId();
         List<Exception> ctEl = allThreadsTransactionBeginStackSave.get(curThreadId);
-        if (ctEl != null && ctEl.size() > 0) {
+        if (UtilValidate.isNotEmpty(ctEl)) {
             ctEl.remove(0);
         }
     
      // then do the more reliable ThreadLocal one
         List<Exception> el = transactionBeginStackSave.get();
-        if (el != null && el.size() > 0) {
+        if (UtilValidate.isNotEmpty(el)) {
             return el.remove(0);
         } else {
             return null;
@@ -620,7 +620,7 @@
     
  Debug.logInfo(transactionBeginStack, "===================================================\n===================================================\n Current tx begin stack for thread [" + curThreadId + "]:", module);
     
-     if (txBeginStackList != null && txBeginStackList.size() > 0) {
+     if (UtilValidate.isNotEmpty(txBeginStackList)) {
          int stackLevel = 0;
          for (Exception stack : txBeginStackList) {
          Debug.logInfo(stack, "===================================================\n===================================================\n Tx begin stack history for thread [" + curThreadId + "] history number [" + stackLevel + "]:", module);
@@ -696,7 +696,7 @@
     }
     private static RollbackOnlyCause popSetRollbackOnlyCauseSave() {
         List<RollbackOnlyCause> el = setRollbackOnlyCauseSave.get();
-        if (el != null && el.size() > 0) {
+        if (UtilValidate.isNotEmpty(el)) {
             return el.remove(0);
         } else {
             return null;

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java Sun Aug 17 00:47:18 2008
@@ -35,15 +35,13 @@
 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.GenericDelegator;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
-import org.ofbiz.entity.condition.EntityConditionList;
 import org.ofbiz.entity.condition.EntityDateFilterCondition;
-import org.ofbiz.entity.condition.EntityFieldMap;
-import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.condition.OrderByList;
 import org.ofbiz.entity.model.ModelField;
 
@@ -411,7 +409,7 @@
     public static GenericValue newDatedInclusionEntity(GenericDelegator delegator, String entityName, Map<String, ? extends Object> find, Timestamp now) throws GenericEntityException {
         Map<String, Object> search;
         List<GenericValue> entities = findDatedInclusionEntity(delegator, entityName, find, now);
-        if (entities != null && entities.size() > 0) {
+        if (UtilValidate.isNotEmpty(entities)) {
             search = null;
             for (GenericValue entity: entities) {
                 if (now.equals(entity.get("fromDate"))) {

Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Sun Aug 17 00:47:18 2008
@@ -21,7 +21,6 @@
 import java.net.URL;
 import java.net.MalformedURLException;
 import java.text.NumberFormat;
-import java.util.Iterator;
 import java.util.List;
 import java.io.File;
 
@@ -33,6 +32,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilURL;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.util.EntityDataLoader;
@@ -248,7 +248,7 @@
         List<Object> errorMessages = FastList.newInstance();
         List<String> infoMessages = FastList.newInstance();
         int totalRowsChanged = 0;
-        if (urlList != null && urlList.size() > 0) {
+        if (UtilValidate.isNotEmpty(urlList)) {
             Debug.logImportant("=-=-=-=-=-=-= Doing a data load with the following files:", module);
             for (URL dataUrl: urlList) {
                 Debug.logImportant(dataUrl.toExternalForm(), module);

Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataServices.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataServices.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataServices.java Sun Aug 17 00:47:18 2008
@@ -35,6 +35,7 @@
 import org.ofbiz.base.util.FileUtil;
 import org.ofbiz.base.util.UtilURL;
 import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
 
 import javolution.util.FastList;
 
@@ -44,8 +45,6 @@
 import java.net.URL;
 import java.net.URISyntaxException;
 
-import javolution.util.FastList;
-
 /**
  * Entity Data Import/Export Services
  *
@@ -94,7 +93,7 @@
 
         // get the file list
         List<File> files = getFileList(root);
-        if (files != null && files.size() > 0) {
+        if (UtilValidate.isNotEmpty(files)) {
             for (File file: files) {
                 try {
                     Map<String, Object> serviceCtx = UtilMisc.toMap("file", file, "delimiter", delimiter, "userLogin", userLogin);

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java Sun Aug 17 00:47:18 2008
@@ -770,7 +770,7 @@
                 summaryErrorStringBuffer.append(errorMsg);
             }
             List<Object> tempErrorMsgList = UtilGenerics.checkList(methodContext.getEnv(eventErrorMessageListName));
-            if (tempErrorMsgList != null && tempErrorMsgList.size() > 0) {
+            if (UtilValidate.isNotEmpty(tempErrorMsgList)) {
                 methodContext.getRequest().setAttribute("_ERROR_MESSAGE_LIST_", tempErrorMsgList);
                 forceError = true;
                 
@@ -783,7 +783,7 @@
                 methodContext.getRequest().setAttribute("_EVENT_MESSAGE_", eventMsg);
             }
             List<String> eventMsgList = UtilGenerics.checkList(methodContext.getEnv(eventEventMessageListName));
-            if (eventMsgList != null && eventMsgList.size() > 0) {
+            if (UtilValidate.isNotEmpty(eventMsgList)) {
                 methodContext.getRequest().setAttribute("_EVENT_MESSAGE_LIST_", eventMsgList);
             }
 
@@ -814,7 +814,7 @@
             }
 
             List<Object> errorMsgList = UtilGenerics.checkList(methodContext.getEnv(serviceErrorMessageListName));
-            if (errorMsgList != null && errorMsgList.size() > 0) {
+            if (UtilValidate.isNotEmpty(errorMsgList)) {
                 methodContext.putResult(ModelService.ERROR_MESSAGE_LIST, errorMsgList);
                 forceError = true;
                 
@@ -823,7 +823,7 @@
             }
 
             Map<String, Object> errorMsgMap = UtilGenerics.checkMap(methodContext.getEnv(serviceErrorMessageMapName));
-            if (errorMsgMap != null && errorMsgMap.size() > 0) {
+            if (UtilValidate.isNotEmpty(errorMsgMap)) {
                 methodContext.putResult(ModelService.ERROR_MESSAGE_MAP, errorMsgMap);
                 forceError = true;
                 
@@ -837,7 +837,7 @@
             }
 
             List<Object> successMsgList = UtilGenerics.checkList(methodContext.getEnv(serviceSuccessMessageListName));
-            if (successMsgList != null && successMsgList.size() > 0) {
+            if (UtilValidate.isNotEmpty(successMsgList)) {
                 methodContext.putResult(ModelService.SUCCESS_MESSAGE_LIST, successMsgList);
             }
 
@@ -891,7 +891,7 @@
     public static void readOperations(Element simpleMethodElement, List<MethodOperation> methodOperations, SimpleMethod simpleMethod) {
         List<? extends Element> operationElements = UtilXml.childElementList(simpleMethodElement);
 
-        if (operationElements != null && operationElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(operationElements)) {
             for (Element curOperElem: operationElements) {
                 String nodeName = curOperElem.getNodeName();
                 MethodOperation methodOp = null;

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java Sun Aug 17 00:47:18 2008
@@ -128,14 +128,14 @@
         defaultMessage = new FlexibleMessage(UtilXml.firstChildElement(element, "default-message"), "service.default.message");
 
         List<? extends Element> resultsToMapElements = UtilXml.childElementList(element, "results-to-map");
-        if (resultsToMapElements != null && resultsToMapElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(resultsToMapElements)) {
             for (Element resultsToMapElement: resultsToMapElements) {
                 resultsToMap.add(resultsToMapElement.getAttribute("map-name"));
             }
         }
 
         List<? extends Element> resultToFieldElements = UtilXml.childElementList(element, "result-to-field");
-        if (resultToFieldElements != null && resultToFieldElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(resultToFieldElements)) {
             for (Element resultToFieldElement: resultToFieldElements) {
                 ResultToFieldDef rtfDef = new ResultToFieldDef();
 
@@ -149,7 +149,7 @@
 
         // get result-to-request and result-to-session sub-ops
         List<? extends Element> resultToRequestElements = UtilXml.childElementList(element, "result-to-request");
-        if (resultToRequestElements != null && resultToRequestElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(resultToRequestElements)) {
             for (Element resultToRequestElement: resultToRequestElements) {
                 FlexibleServletAccessor<Object> reqAcsr = new FlexibleServletAccessor<Object>(resultToRequestElement.getAttribute("request-name"), resultToRequestElement.getAttribute("result-name"));
                 ContextAccessor<Object> resultAcsr = new ContextAccessor<Object>(resultToRequestElement.getAttribute("result-name"));
@@ -158,7 +158,7 @@
         }
 
         List<? extends Element> resultToSessionElements = UtilXml.childElementList(element, "result-to-session");
-        if (resultToSessionElements != null && resultToSessionElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(resultToSessionElements)) {
             for (Element resultToSessionElement: resultToSessionElements) {
                 FlexibleServletAccessor<Object> sesAcsr = new FlexibleServletAccessor<Object>(resultToSessionElement.getAttribute("session-name"), resultToSessionElement.getAttribute("result-name"));
                 ContextAccessor<Object> resultAcsr = new ContextAccessor<Object>(resultToSessionElement.getAttribute("result-name"));
@@ -167,7 +167,7 @@
         }
 
         List<? extends Element> resultToResultElements = UtilXml.childElementList(element, "result-to-result");
-        if (resultToResultElements != null && resultToResultElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(resultToResultElements)) {
             for (Element resultToResultElement: resultToResultElements) {
                 ContextAccessor<Object> serResAcsr = new ContextAccessor<Object>(resultToResultElement.getAttribute("service-result-name"), resultToResultElement.getAttribute("result-name"));
                 ContextAccessor<Object> resultAcsr = new ContextAccessor<Object>(resultToResultElement.getAttribute("result-name"));

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CheckErrors.java Sun Aug 17 00:47:18 2008
@@ -20,6 +20,7 @@
 
 import java.util.List;
 
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
@@ -65,7 +66,7 @@
     public boolean exec(MethodContext methodContext) {
         List<Object> messages = errorListAcsr.get(methodContext);
 
-        if (messages != null && messages.size() > 0) {
+        if (UtilValidate.isNotEmpty(messages)) {
             String errorCode = methodContext.expandString(this.errorCode);
             
             if (methodContext.getMethodType() == MethodContext.EVENT) {

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/MasterIf.java Sun Aug 17 00:47:18 2008
@@ -59,7 +59,7 @@
         SimpleMethod.readOperations(thenElement, thenSubOps, simpleMethod);
         
         List<? extends Element> elseIfElements = UtilXml.childElementList(element, "else-if");
-        if (elseIfElements != null && elseIfElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(elseIfElements)) {
             elseIfs = FastList.newInstance();
             for (Element elseIfElement: elseIfElements) {
                 elseIfs.add(new ElseIf(elseIfElement, simpleMethod));
@@ -85,7 +85,7 @@
             return SimpleMethod.runSubOps(thenSubOps, methodContext);
         } else {
             // try the else-ifs
-            if (elseIfs != null && elseIfs.size() > 0) {
+            if (UtilValidate.isNotEmpty(elseIfs)) {
                 for (ElseIf elseIf: elseIfs) {
                     if (elseIf.checkCondition(methodContext)) {
                         return elseIf.runSubOps(methodContext);

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringAppend.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringAppend.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringAppend.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringAppend.java Sun Aug 17 00:47:18 2008
@@ -89,7 +89,7 @@
         
         if (!argListAcsr.isEmpty()) {
             List<? extends Object> argList = argListAcsr.get(methodContext);
-            if (argList != null && argList.size() > 0) {
+            if (UtilValidate.isNotEmpty(argList)) {
                 value = MessageFormat.format(value, argList.toArray());
             }
         }

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToField.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToField.java Sun Aug 17 00:47:18 2008
@@ -67,7 +67,7 @@
         
         if (!argListAcsr.isEmpty()) {
             List<? extends Object> argList = argListAcsr.get(methodContext);
-            if (argList != null && argList.size() > 0) {
+            if (UtilValidate.isNotEmpty(argList)) {
                 valueStr = MessageFormat.format(valueStr, argList.toArray());
             }
         }

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToList.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToList.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToList.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringToList.java Sun Aug 17 00:47:18 2008
@@ -62,7 +62,7 @@
         String valueStr = methodContext.expandString(string);
         if (!argListAcsr.isEmpty()) {
             List<? extends Object> argList = argListAcsr.get(methodContext);
-            if (argList != null && argList.size() > 0) {
+            if (UtilValidate.isNotEmpty(argList)) {
                 valueStr = MessageFormat.format(valueStr, argList.toArray());
             }
         }

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/PropertyToField.java Sun Aug 17 00:47:18 2008
@@ -84,7 +84,7 @@
 
         if (!argListAcsr.isEmpty()) {
             List<? extends Object> argList = argListAcsr.get(methodContext);
-            if (argList != null && argList.size() > 0) {
+            if (UtilValidate.isNotEmpty(argList)) {
                 value = MessageFormat.format(value, argList.toArray());
             }
         }

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MakeInString.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MakeInString.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MakeInString.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MakeInString.java Sun Aug 17 00:47:18 2008
@@ -40,7 +40,7 @@
 
         List<? extends Element> operationElements = UtilXml.childElementList(makeInStringElement);
 
-        if (operationElements != null && operationElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(operationElements)) {
             for (Element curOperElem: operationElements) {
                 String nodeName = curOperElem.getNodeName();
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MapProcessor.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MapProcessor.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MapProcessor.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/MapProcessor.java Sun Aug 17 00:47:18 2008
@@ -54,13 +54,13 @@
     }
 
     public void exec(Map<String, Object> inMap, Map<String, Object> results, List<Object> messages, Locale locale, ClassLoader loader) {
-        if (makeInStrings != null && makeInStrings.size() > 0) {
+        if (UtilValidate.isNotEmpty(makeInStrings)) {
             for (MakeInString makeInString: makeInStrings) {
                 makeInString.exec(inMap, results, messages, locale, loader);
             }
         }
 
-        if (simpleMapProcesses != null && simpleMapProcesses.size() > 0) {
+        if (UtilValidate.isNotEmpty(simpleMapProcesses)) {
             for (SimpleMapProcess simpleMapProcess: simpleMapProcesses) {
                 simpleMapProcess.exec(inMap, results, messages, locale, loader);
             }

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/SimpleMapProcess.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/SimpleMapProcess.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/SimpleMapProcess.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/operation/SimpleMapProcess.java Sun Aug 17 00:47:18 2008
@@ -53,7 +53,7 @@
     void readOperations(Element simpleMapProcessElement) {
         List<? extends Element> operationElements = UtilXml.childElementList(simpleMapProcessElement);
 
-        if (operationElements != null && operationElements.size() > 0) {
+        if (UtilValidate.isNotEmpty(operationElements)) {
             for (Element curOperElem: operationElements) {
                 String nodeName = curOperElem.getNodeName();
 

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java?rev=686591&r1=686590&r2=686591&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java Sun Aug 17 00:47:18 2008
@@ -23,6 +23,7 @@
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilGenerics;
+import org.ofbiz.base.util.UtilValidate;
 
 import java.util.List;
 import java.util.Map;
@@ -102,7 +103,7 @@
         ServiceConfigUtil.NotificationGroup group = ServiceConfigUtil.getNotificationGroup(notificationGroupName);
         if (group != null) {
             List<String> addr = group.getAddress("to");
-            if (addr != null && addr.size() > 0) {
+            if (UtilValidate.isNotEmpty(addr)) {
                 return StringUtil.join(addr, ",");
             }
         }
@@ -124,7 +125,7 @@
         ServiceConfigUtil.NotificationGroup group = ServiceConfigUtil.getNotificationGroup(notificationGroupName);
         if (group != null) {
             List<String> addr = group.getAddress("bcc");
-            if (addr != null && addr.size() > 0) {
+            if (UtilValidate.isNotEmpty(addr)) {
                 return StringUtil.join(addr, ",");
             }
         }
@@ -135,7 +136,7 @@
         ServiceConfigUtil.NotificationGroup group = ServiceConfigUtil.getNotificationGroup(notificationGroupName);
         if (group != null) {
             List<String> addr = group.getAddress("from");
-            if (addr != null && addr.size() > 0) {
+            if (UtilValidate.isNotEmpty(addr)) {
                 return addr.get(0);
             }
         }