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:
parent
12dea26028
commit
9b70db7a0e
1 changed files with 7 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue