Author: doogie
Date: Fri May 4 23:36:56 2012
New Revision: 1334256
URL:
http://svn.apache.org/viewvc?rev=1334256&view=revLog:
OPTIMIZE: Move delegatorInfo assignment into the constructor; in all
cases, this will always be configured, so might as well do it early.
This really should be final, but that change will come later.
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=1334256&r1=1334255&r2=1334256&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Fri May 4 23:36:56 2012
@@ -209,6 +209,7 @@ public class GenericDelegator implements
protected GenericDelegator(String delegatorFullName) throws GenericEntityException {
//if (Debug.infoOn()) Debug.logInfo("Creating new Delegator with name \"" + delegatorFullName + "\".", module);
this.setDelegatorNames(delegatorFullName);
+ this.delegatorInfo = EntityConfigUtil.getDelegatorInfo(delegatorBaseName);
// before continuing, if there is a tenantId use the base delegator to see if it is valid
if (UtilValidate.isNotEmpty(this.delegatorTenantId)) {
@@ -361,9 +362,6 @@ public class GenericDelegator implements
}
protected DelegatorInfo getDelegatorInfo() {
- if (this.delegatorInfo == null) {
- this.delegatorInfo = EntityConfigUtil.getDelegatorInfo(this.delegatorBaseName);
- }
return this.delegatorInfo;
}