Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikkola committed Apr 6, 2020
1 parent f2bd609 commit 14af236
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.kie.dmn.feel.FEEL;
import org.kie.dmn.feel.codegen.feel11.ProcessedExpression;
import org.kie.dmn.feel.lang.ast.BaseNode;
import org.kie.dmn.feel.lang.ast.NullNode;
import org.kie.dmn.feel.lang.ast.UnaryTestListNode;
import org.kie.dmn.feel.lang.ast.UnaryTestNode;
import org.kie.dmn.feel.lang.ast.Visitor;
Expand All @@ -42,8 +43,12 @@ public Util(final FEEL feel,
this.outputClauseVisitor = outputClauseVisitor;
}

public Values valuesFromNode(final BaseNode start) {
return new Values<>(valueFromNode(start, valueFromNodeVisitor));
public Values valuesFromNode(final BaseNode node) {
if (node instanceof NullNode) {
return Values.nullValue();
} else {
return new Values<>(valueFromNode(node, valueFromNodeVisitor));
}
}

private Comparable<?> valueFromNode(final BaseNode node, Visitor<Comparable<?>> visitor) {
Expand Down

0 comments on commit 14af236

Please sign in to comment.