Skip to content

Commit

Permalink
Fixed another "prism context is null" exception; this time manifestin…
Browse files Browse the repository at this point in the history
…g in shopping cart.
  • Loading branch information
mederly committed Jul 6, 2017
1 parent 5284ce0 commit 6e45156
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Expand Up @@ -553,6 +553,7 @@ public PrismContainerValue<AssignmentType> getOldValue() {
}

public PrismContainerValue<AssignmentType> getNewValue(PrismContext prismContext) throws SchemaException {
prismContext.adopt(newAssignment);
// this removes activation element if it's empty
ActivationType activation = newAssignment.getActivation();
if (activation == null || activation.asPrismContainerValue().isEmpty()) {
Expand Down
Expand Up @@ -698,4 +698,13 @@ public Referencable getRealValue() {
public static boolean containsOid(Collection<PrismReferenceValue> values, @NotNull String oid) {
return values.stream().anyMatch(v -> oid.equals(v.getOid()));
}

@Override
public void revive(PrismContext prismContext) throws SchemaException {
super.revive(prismContext);
if (object != null) {
object.revive(prismContext);
}
}

}
Expand Up @@ -1921,7 +1921,7 @@ private List<Task> listWaitingTasks(TaskWaitingReason reason, OperationResult re
// returns map task lightweight id -> task
public Map<String,TaskQuartzImpl> getLocallyRunningTaskInstances() {
synchronized (locallyRunningTaskInstancesMap) { // must be synchronized while iterating over it (addAll)
return new HashMap<String,TaskQuartzImpl>(locallyRunningTaskInstancesMap);
return new HashMap<>(locallyRunningTaskInstancesMap);
}
}

Expand Down

0 comments on commit 6e45156

Please sign in to comment.