Open saig0 opened 9 months ago
In my Java code, I use the following snippet to collect the suppressed failures:
private static List<FeelEvaluationWarning> collectEvaluationWarnings(EvaluationResult result) {
final var warnings = new ArrayList<FeelEvaluationWarning>();
result
.suppressedFailures()
.foreach(
failure -> {
final var warning =
FeelEvaluationWarning.of(
failure.failureType().toString(), failure.failureMessage());
warnings.add(warning);
return null;
});
return warnings;
}
Describe the bug From a Java application, I can't access the suppressed failures of an
EvaluationResult
smoothly. The result returns the failures as a Scala list that is not easy to consume from Java code. See hereTo Reproduce Steps to reproduce the behavior:
EvaluationResult
.Expected behavior From Java code, I can't access the list of evaluation failures natively (i.e. without any type transformation).
Related to https://github.com/camunda/feel-scala/issues/539.
Environment
1.17.0