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.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759372 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -194,6 +194,10 @@ public class GenericDelegator implements Delegator {
|
||||
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)) {
|
||||
|
||||
Reference in New Issue
Block a user