From 5819c1b6b03d86da87b5db8474751144f259e0a3 Mon Sep 17 00:00:00 2001 From: lskublik Date: Wed, 25 Mar 2020 13:45:09 +0100 Subject: [PATCH] adding of resource name to error message for resource dependency error (MID-5417) --- .../impl/lens/projector/DependencyProcessor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/DependencyProcessor.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/DependencyProcessor.java index b8e19c87114..0ff82a28096 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/DependencyProcessor.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/DependencyProcessor.java @@ -138,22 +138,22 @@ private LensProjectionContext determineProjectionWaveProv if (LOGGER.isTraceEnabled()) { LOGGER.trace(" processing dependency: {}: unsatisfied strict dependency", PrettyPrinter.prettyPrint(outDependency)); } - throw new PolicyViolationException("Unsatisfied strict dependency of account "+projectionContext.getResourceShadowDiscriminator()+ - " dependent on "+refDiscr+": Account not provisioned"); + throw new PolicyViolationException("Unsatisfied strict dependency in resource "+projectionContext.getResourceName()+"(oid:" + projectionContext.getResourceOid()+ + ") of account "+projectionContext.getResourceShadowDiscriminator()+" dependent on "+refDiscr+": Account not provisioned"); } else if (outDependencyStrictness == ResourceObjectTypeDependencyStrictnessType.LAX) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(" processing dependency: {}: unsatisfied lax dependency", PrettyPrinter.prettyPrint(outDependency)); } // independent object not in the context, just ignore it - LOGGER.debug("Unsatisfied lax dependency of account "+projectionContext.getResourceShadowDiscriminator()+ - " dependent on "+refDiscr+"; dependency skipped"); + LOGGER.debug("Unsatisfied lax dependency in resource "+projectionContext.getResourceName()+"(oid:" + projectionContext.getResourceOid()+ + ") of account "+projectionContext.getResourceShadowDiscriminator()+" dependent on "+refDiscr+"; dependency skipped"); } else if (outDependencyStrictness == ResourceObjectTypeDependencyStrictnessType.RELAXED) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(" processing dependency: {}: unsatisfied relaxed dependency", PrettyPrinter.prettyPrint(outDependency)); } // independent object not in the context, just ignore it - LOGGER.debug("Unsatisfied relaxed dependency of account "+projectionContext.getResourceShadowDiscriminator()+ - " dependent on "+refDiscr+"; dependency skipped"); + LOGGER.debug("Unsatisfied relaxed dependency in resource "+projectionContext.getResourceName()+"(oid:" + projectionContext.getResourceOid()+ + ") of account "+projectionContext.getResourceShadowDiscriminator()+" dependent on "+refDiscr+"; dependency skipped"); } else { throw new IllegalArgumentException("Unknown dependency strictness "+outDependency.getStrictness()+" in "+refDiscr); }