executeWithLocalEvents(new Callable() {
public Object run() throws RepositoryException {
Node node = getNode(nodeId, sInfo);
Version version = null;
boolean cancel;
NamePathResolver resolver = sInfo.getNamePathResolver();
List l = Arrays.asList(mergeFailedIds);
Property mergeFailed = node.getProperty(resolver.getJCRName(NameConstants.JCR_MERGEFAILED));
Value[] values = mergeFailed.getValues();
for (int i = 0; i < values.length; i++) {
String uuid = values[i].getString();
if (!l.contains(idFactory.createNodeId(uuid))) {
version = (Version) sInfo.getSession().getNodeByUUID(uuid);
break;
}
}
l = new ArrayList(predecessorIds.length);
l.addAll(Arrays.asList(predecessorIds));
Property predecessors = node.getProperty(resolver.getJCRName(NameConstants.JCR_PREDECESSORS));
values = predecessors.getValues();
for (int i = 0; i < values.length; i++) {
NodeId vId = idFactory.createNodeId(values[i].getString());
l.remove(vId);
}