Fix NullPointerException when saving a relational object that doesn't have a

property map (i.e. has no properties set).
This commit is contained in:
hns 2004-03-09 11:31:18 +00:00
parent 12dea26028
commit 9b70db7a0e

View file

@ -655,9 +655,14 @@ public final class NodeManager {
db.saveNode(txn, node.getID(), node);
} else {
Hashtable propMap = node.getPropMap();
Property[] props = new Property[propMap.size()];
Property[] props;
propMap.values().toArray(props);
if (propMap == null) {
props = new Property[0];
} else {
props = new Property[propMap.size()];
propMap.values().toArray(props);
}
// make sure table meta info is loaded by dbmapping
dbm.getColumns();