Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Catching tombstone errors when checking for skolem nodes
  • Loading branch information
escowles committed Apr 21, 2015
1 parent dcef9df commit 94f0694
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -25,6 +25,7 @@
import javax.jcr.AccessDeniedException;

import org.fcrepo.kernel.exception.RepositoryRuntimeException;
import org.fcrepo.kernel.exception.TombstoneException;
import org.fcrepo.kernel.identifiers.IdentifierConverter;
import org.fcrepo.kernel.models.FedoraResource;

Expand Down Expand Up @@ -122,6 +123,9 @@ private boolean isSkolem(final RDFNode n) {
!translator.asString(n.asResource()).contains("/fcr:") &&
// include only those resources with our marker type
translator.convert(n.asResource()).hasType(FEDORA_SKOLEMNODE);
} catch (final TombstoneException e) {
log.debug("Tombstone is not a skolem: {}", n);
return false;
} catch (final RepositoryRuntimeException e) {
if (e.getCause() instanceof AccessDeniedException) {
// If the potentially-Skolem node in hand is inaccessible to our examination, it could not be a Skolem
Expand All @@ -133,4 +137,4 @@ private boolean isSkolem(final RDFNode n) {
throw e;
}
}
}
}

0 comments on commit 94f0694

Please sign in to comment.