Skip to content

Commit

Permalink
TwoStateSimulatedToRealConverter: quotes around attribute, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Mar 24, 2023
1 parent 0e48874 commit 96b3c45
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2021 Evolveum and contributors
* Copyright (C) 2010-2023 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
Expand Down Expand Up @@ -58,9 +58,7 @@ public T convert(Collection<Object> simulatingAttributeValues, OperationResult r
}

@Nullable
private T convertNull(OperationResult result) throws ObjectNotFoundException, SchemaException, CommunicationException,
ConfigurationException, ExpressionEvaluationException {

private T convertNull(OperationResult result) {
if (MiscUtil.hasNoValue(simulatedNegativeValues)) {
return resolvedNegativeValue;
}
Expand All @@ -69,18 +67,16 @@ private T convertNull(OperationResult result) throws ObjectNotFoundException, Sc
return resolvedPositiveValue;
}

LOGGER.warn("The {} does not provide definition for null value of simulated {} attribute",
LOGGER.warn("The {} does not provide definition for null value of simulated '{}' attribute",
ctx.getResource(), description);
result.recordPartialError("The " + ctx.getResource()
+ " does not provide definition for null value of simulated " + description + " attribute");
+ " does not provide definition for null value of simulated '" + description + "' attribute");

return null;
}

@Nullable
private T convertNonNull(Collection<Object> simulatingAttributeValues, OperationResult result)
throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException,
ExpressionEvaluationException {
private T convertNonNull(Collection<Object> simulatingAttributeValues, OperationResult result) {

if (simulatingAttributeValues.size() > 1) {
LOGGER.warn("An object on {} has {} values for simulated {} attribute, expecting just one value",
Expand All @@ -103,5 +99,4 @@ private T convertNonNull(Collection<Object> simulatingAttributeValues, Operation
}
return null;
}

}

0 comments on commit 96b3c45

Please sign in to comment.