Skip to content

Commit

Permalink
fixing after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed May 11, 2017
1 parent adc3d52 commit 63127be
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -131,17 +131,18 @@ public PrismValueDeltaSetTriple<V> evaluate(ExpressionEvaluationContext context)
//
String stringValue = null;
GenerateExpressionEvaluatorModeType mode = generateEvaluatorType.getMode();
Item<V, D> output = outputDefinition.instantiate();
if (mode == null || mode == GenerateExpressionEvaluatorModeType.POLICY) {

PrismObject<? extends ObjectType> object = getObject(context);

// TODO: generate value based on stringPolicyType (if not null)
if (stringPolicyType != null) {
if (isNotEmptyMinLength(stringPolicyType)) {
stringValue = valuePolicyGenerator.generate(stringPolicyType, DEFAULT_LENGTH, true, object,
stringValue = valuePolicyGenerator.generate(output.getPath(), stringPolicyType, DEFAULT_LENGTH, true, object,
context.getContextDescription(), context.getTask(), context.getResult());
} else {
stringValue = valuePolicyGenerator.generate(stringPolicyType, DEFAULT_LENGTH, false, object,
stringValue = valuePolicyGenerator.generate(output.getPath(), stringPolicyType, DEFAULT_LENGTH, false, object,
context.getContextDescription(), context.getTask(), context.getResult());
}
context.getResult().computeStatus();
Expand All @@ -167,7 +168,7 @@ public PrismValueDeltaSetTriple<V> evaluate(ExpressionEvaluationContext context)

Object value = ExpressionUtil.convertToOutputValue(stringValue, outputDefinition, protector);

Item<V, D> output = outputDefinition.instantiate();

if (output instanceof PrismProperty) {
PrismPropertyValue<Object> pValue = new PrismPropertyValue<Object>(value);
((PrismProperty<Object>) output).add(pValue);
Expand Down

0 comments on commit 63127be

Please sign in to comment.