Author: hansbak
Date: Fri May 18 23:00:09 2007
New Revision: 539691
URL:
http://svn.apache.org/viewvc?view=rev&rev=539691Log:
If a entity to extend does not exist: NPE replaced with exception and message
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java?view=diff&rev=539691&r1=539690&r2=539691==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java Fri May 18 23:00:09 2007
@@ -256,6 +256,7 @@
Element extendEntityElement = (Element) tempExtendEntityElementIter.next();
String entityName = UtilXml.checkEmpty(extendEntityElement.getAttribute("entity-name"));
ModelEntity modelEntity = (ModelEntity) entityCache.get(entityName);
+ if (modelEntity == null) throw new GenericEntityConfException("Entity to extend does not exist: " + entityName);
modelEntity.addExtendEntity(this, extendEntityElement);
}