IDEMPIERE-1156 PackIn of New EntityType fails. Fixed NPE.

This commit is contained in:
Heng Sin Low 2013-07-09 22:08:59 +08:00
parent d4f2d337cc
commit ba2d798449
1 changed files with 4 additions and 1 deletions

View File

@ -578,7 +578,10 @@ public abstract class AbstractElementHandler implements ElementHandler {
protected boolean hasUUIDKey(PIPOContext ctx, Element element) { protected boolean hasUUIDKey(PIPOContext ctx, Element element) {
String tableName = element.getElementValue(); String tableName = element.getElementValue();
String uuidColumn = PO.getUUIDColumnName(tableName); String uuidColumn = PO.getUUIDColumnName(tableName);
String uuid = element.properties.get(uuidColumn).contents.toString(); String uuid = null;
if (element.properties.containsKey(uuidColumn)) {
uuid = element.properties.get(uuidColumn).contents.toString();
}
return (uuid != null && uuid.trim().length() == 36); return (uuid != null && uuid.trim().length() == 36);
} }