NodeRenamed nodeRenamedChange = (NodeRenamed)nodeChange;
Path oldPath = pathFactory().create(newPath.subpath(0, newPath.size() - 1), nodeRenamedChange.getOldSegment());
fireNodeMoved(events, bundle, newPath, nodeId, oldPath, primaryType, mixinTypes);
} else if (nodeChange instanceof NodeReordered) {
NodeReordered nodeReordered = (NodeReordered)nodeChange;
Path oldPath = nodeReordered.getOldPath();
if (eventListenedFor(Event.NODE_MOVED)) {
Map<String, String> info = new HashMap<>();
// check if the reordering wasn't at the end by any chance
if (nodeReordered.getReorderedBeforePath() != null) {
info.put(ORDER_DEST_KEY, stringFor(nodeReordered.getReorderedBeforePath().getLastSegment()));
} else {
info.put(ORDER_DEST_KEY, null);
}
if (oldPath != null) {
info.put(ORDER_SRC_KEY, stringFor(oldPath.getLastSegment()));