@Override
public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
if (previousRoot != null) {
try {
FilterProvider provider = filterProvider.get();
// FIXME don't rely on toString for session id
if (provider.includeCommit(contentSession.toString(), info)) {
ImmutableTree beforeTree = getTree(previousRoot, provider.getPath());
ImmutableTree afterTree = getTree(root, provider.getPath());
EventIterator<Event> events = new EventIterator<Event>(
beforeTree.getNodeState(), afterTree.getNodeState(),
provider.getFilter(beforeTree, afterTree),
new JcrListener(beforeTree, afterTree, namePathMapper, info));
if (events.hasNext()) {
synchronized (this) {
if (!stopping) {
eventListener.onEvent(new EventIteratorAdapter(events));