Skip to content

Commit

Permalink
Fixed the order of variable declarations passed to the MarkupGenerator.
Browse files Browse the repository at this point in the history
  • Loading branch information
rousso committed May 10, 2024
1 parent 4059aed commit d78b076
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public Set<Variable> getOwnVariables() {
if (this.context != null && this.context.variable() != null) {
variables.add(this.context.variable());
}
variables.addAll(this.variables);
variables.addAll(this.variables.declaredOrder());
return variables;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package eu.europa.ted.efx.model.variables;

import java.util.Collections;
import java.util.LinkedList;

import eu.europa.ted.efx.model.ParsedEntity;
Expand All @@ -8,4 +9,11 @@ public class VariableList extends LinkedList<Variable> implements ParsedEntity {

public VariableList() {
}

public VariableList declaredOrder() {
VariableList reversedList = new VariableList();
reversedList.addAll(this);
Collections.reverse(reversedList);
return reversedList;
}
}

0 comments on commit d78b076

Please sign in to comment.