Skip to content

Commit

Permalink
Move variable closer to where it's actually used
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalmazor committed Mar 9, 2020
1 parent e0cef02 commit 451f40b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/javarosa/core/model/TriggerableDag.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,14 @@ private Set<QuickTriggerable> doEvaluateTriggerables(FormInstance mainInstance,
* against the anchor (the value that changed which triggered recomputation)
*/
private void evaluateTriggerable(FormInstance mainInstance, EvaluationContext evalContext, QuickTriggerable qt, TreeReference anchorRef) {
List<EvaluationResult> evaluationResults = new ArrayList<>(0);

// Contextualize the reference used by the triggerable against the anchor
TreeReference contextRef = qt.contextualizeContextRef(anchorRef);

// Now identify all of the fully qualified nodes which this
// triggerable updates. (Multiple nodes can be updated by the same trigger)
List<TreeReference> qualifiedList = evalContext.expandReference(contextRef);

List<EvaluationResult> evaluationResults = new ArrayList<>(0);
// Go through each one and evaluate the trigger expression
for (TreeReference qualified : qualifiedList)
try {
Expand Down

0 comments on commit 451f40b

Please sign in to comment.