break;
}
}
if (targetPolicySet == null) {
throw new RepositoryException("Id not found or not an action-id: " + pivotId);
}
if (!(PolicySetHelper.deletePolicyReference(targetPolicySet, id))) {
throw new RepositoryException(String.format("Id \"%s\" not found into resource \"%s\"",
id,
targetPolicySet.getPolicySetId()));
}
int pivotIndex = PolicySetHelper.getPolicyIdReferenceIndex(targetPolicySet, pivotId);