EffectiveNodeType ent = getEffectiveNodeType(targetState);
if (ent.includesNodeType(NameConstants.MIX_REFERENCEABLE)) {
NodeReferencesId refsId = new NodeReferencesId(targetState.getNodeId());
if (stateMgr.hasNodeReferences(refsId)) {
try {
NodeReferences refs = stateMgr.getNodeReferences(refsId);
if (refs.hasReferences()) {
throw new ReferentialIntegrityException(safeGetJCRPath(targetPath)
+ ": cannot remove node with references");
}
} catch (ItemStateException ise) {
String msg = "internal error: failed to check references on "