Skip to content

Commit

Permalink
isDefaultRelation method usage instead of == operation for relation c…
Browse files Browse the repository at this point in the history
…omparison
  • Loading branch information
KaterynaHonchar committed Mar 6, 2023
1 parent 86b365e commit b140882
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private <AH extends AssignmentHolderType> LocalizableMessage createShortMessage(
QName relation = ctx.evaluatedAssignment.getNormalizedRelation();
LocalizableMessage builtInMessage;

if (relation == null || relation == prismContext.getDefaultRelation()) {
if (prismContext.isDefaultRelation(relation)) {
builtInMessage = new LocalizableMessageBuilder()
.key(SchemaConstants.DEFAULT_POLICY_CONSTRAINT_SHORT_MESSAGE_KEY_PREFIX + CONSTRAINT_KEY_PREFIX + keyPostfix)
.arg(ObjectTypeUtil.createDisplayInformation(ctx.evaluatedAssignment.getTarget(), false))
Expand Down

0 comments on commit b140882

Please sign in to comment.