Author: jacopoc
Date: Tue Sep 6 07:18:01 2016
New Revision: 1759372
URL:
http://svn.apache.org/viewvc?rev=1759372&view=revLog:
Throw an exception rather than failing with a NPE if delegatorInfo is null: this can happen for example when the entityconfig.xml file is missing.
Modified:
ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java
Modified: ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java?rev=1759372&r1=1759371&r2=1759372&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java Tue Sep 6 07:18:01 2016
@@ -194,6 +194,10 @@ public class GenericDelegator implements
this.setDelegatorNames(delegatorFullName);
this.delegatorInfo = EntityConfig.getInstance().getDelegator(delegatorBaseName);
+ if (this.delegatorInfo == null) {
+ throw new GenericEntityException("No configuration found for delegator [" + delegatorFullName + "]");
+ }
+
String kekText;
// before continuing, if there is a tenantId use the base delegator to see if it is valid
if (UtilValidate.isNotEmpty(this.delegatorTenantId)) {