svn commit: r884573 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java

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

svn commit: r884573 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java

jleroux@apache.org
Author: jleroux
Date: Thu Nov 26 14:59:11 2009
New Revision: 884573

URL: http://svn.apache.org/viewvc?rev=884573&view=rev
Log:
No duplicates, alphabetical order (at least in English, hopefully more to come regardind this aspect)

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java?rev=884573&r1=884572&r2=884573&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java Thu Nov 26 14:59:11 2009
@@ -70,10 +70,12 @@
         }
         if (defaultGeo != null) {
             geoList.add(defaultGeo);
-            boolean removeDefaultGeo = false;
-            for (GenericValue country  : countriesList) {
-                if (country.get("geoId").equals(defaultGeo.get("geoId"))) {
-                    removeDefaultGeo = true;
+            boolean removeDefaultGeo = UtilValidate.isEmpty(countriesList);
+            if (!removeDefaultGeo) {
+                for (GenericValue country  : countriesList) {
+                    if (country.get("geoId").equals(defaultGeo.get("geoId"))) {
+                        removeDefaultGeo = true;
+                    }
                 }
             }
             if (removeDefaultGeo) {