svn commit: r981123 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

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

svn commit: r981123 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

doogie-3
Author: doogie
Date: Sun Aug  1 03:08:07 2010
New Revision: 981123

URL: http://svn.apache.org/viewvc?rev=981123&view=rev
Log:
The database check attempted to only check each helper once; however,
the Set used to track whether a helper had been checked was *inside* the
loop, so this optimization never actually did what was intended.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=981123&r1=981122&r2=981123&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Sun Aug  1 03:08:07 2010
@@ -247,6 +247,7 @@ public class GenericDelegator implements
         }
 
         // initialize helpers by group
+        TreeSet<String> helpersDone = new TreeSet<String>();
         Set<String> groupNames = getModelGroupReader().getGroupNames(delegatorBaseName);
         for (String groupName: groupNames) {
             GenericHelperInfo helperInfo = this.getGroupHelperInfo(groupName);
@@ -254,7 +255,6 @@ public class GenericDelegator implements
 
             if (Debug.infoOn()) Debug.logInfo("Delegator \"" + delegatorFullName + "\" initializing helper \"" +
                     helperBaseName + "\" for entity group \"" + groupName + "\".", module);
-            TreeSet<String> helpersDone = new TreeSet<String>();
             if (UtilValidate.isNotEmpty(helperInfo.getHelperFullName())) {
                 // make sure each helper is only loaded once
                 if (helpersDone.contains(helperInfo.getHelperFullName())) {