/** * Removes the specified subject from this Policy. * * @param label the label identifying the PolicyEntry to modify. * @param subject the Subject to remove from the PolicyEntry identified by the {@code label}. * @return a copy of this Policy with the removed subject. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code label} is empty. */ default Policy removeSubjectFor(final CharSequence label, final Subject subject) { checkNotNull(subject, "subject to be removed"); return removeSubjectFor(label, subject.getId()); }
if (policyEntry.getSubjects().getSubject(subjectId).isPresent()) { final PoliciesValidator validator = PoliciesValidator.newInstance(policy.removeSubjectFor(label, subjectId));
if (policyEntry.getSubjects().getSubject(subjectId).isPresent()) { final PoliciesValidator validator = PoliciesValidator.newInstance(policy.removeSubjectFor(label, subjectId));