Skip to content

Commit

Permalink
Remove a couple of IDE warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Nov 9, 2019
1 parent f98ea69 commit c5da484
Showing 1 changed file with 5 additions and 6 deletions.
Expand Up @@ -1292,14 +1292,12 @@ private boolean isInducementApplicableToFocusType(QName inducementFocusType) thr
return inducementFocusClass.isAssignableFrom(lensContext.getFocusClass());
}

@SuppressWarnings("BooleanMethodIsAlwaysInverted")
private boolean isAllowedByLimitations(AssignmentPathSegment segment, AssignmentType nextAssignment, EvaluationContext ctx) {
AssignmentType currentAssignment = segment.getAssignment(ctx.evaluateOld);
AssignmentSelectorType targetLimitation = currentAssignment.getLimitTargetContent();
if (isDeputyDelegation(nextAssignment)) { // delegation of delegation
if (targetLimitation == null) {
return false;
}
return BooleanUtils.isTrue(targetLimitation.isAllowTransitive());
return targetLimitation != null && BooleanUtils.isTrue(targetLimitation.isAllowTransitive());
} else {
// As for the case of targetRef==null: we want to pass target-less assignments (focus mappings, policy rules etc)
// from the delegator to delegatee. To block them we should use order constraints (but also for assignments?).
Expand Down Expand Up @@ -1337,6 +1335,7 @@ private AssignmentType getAssignmentType(AssignmentPathSegmentImpl segment, Eval

private void checkSchema(AssignmentPathSegmentImpl segment, EvaluationContext ctx) throws SchemaException {
AssignmentType assignmentType = getAssignmentType(segment, ctx);
//noinspection unchecked
PrismContainerValue<AssignmentType> assignmentContainerValue = assignmentType.asPrismContainerValue();
PrismContainerable<AssignmentType> assignmentContainer = assignmentContainerValue.getParent();
if (assignmentContainer == null) {
Expand Down Expand Up @@ -1376,7 +1375,7 @@ private <O extends ObjectType> void setEvaluatedAssignmentTarget(AssignmentPathS
}
}

public PrismValueDeltaSetTriple<PrismPropertyValue<Boolean>> evaluateCondition(MappingType condition,
private PrismValueDeltaSetTriple<PrismPropertyValue<Boolean>> evaluateCondition(MappingType condition,
ObjectType source, AssignmentPathVariables assignmentPathVariables, String contextDescription, EvaluationContext ctx,
OperationResult result) throws ExpressionEvaluationException,
ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException {
Expand Down Expand Up @@ -1585,7 +1584,7 @@ private static class MemberOfInvocation {
private final String targetOid;
private boolean result;

MemberOfInvocation(String targetOid, boolean result) {
private MemberOfInvocation(String targetOid, boolean result) {
this.targetOid = targetOid;
this.result = result;
}
Expand Down

0 comments on commit c5da484

Please sign in to comment.