AsyncTreeModel: remove replaced instance from map

This commit is contained in:
Sergey Malenkov
2018-03-29 20:39:43 +03:00
parent 2036e1abd4
commit 4e6b0c7748
@@ -770,6 +770,7 @@ public final class AsyncTreeModel extends AbstractTreeModel implements Identifia
if (object == node.object) return;
// always use new instance of user's object, because
// some trees provide equal nodes with different behavior
map.remove(node.object);
node.updatePaths(node.object, object);
node.object = object;
map.put(object, node); // update key