That turned out to not work as even if left is FilteredStreamRulePredicate.empty(), isEmpty returns false.
I am happy to contribute a PR. Besides contributing a fix for the isEmpty check, it would be nice to also fix the composition so that it doesn't apply an operator between two predicates if one of them is empty.
I am initializing a predicate to
empty
to build a list ofOR
predicates.I've noticed that applying
or
on such a predicate with anything leads to the following predicate:(notice the space before the
OR
).I've tried to workaround this by creating the following method:
That turned out to not work as even if
left
isFilteredStreamRulePredicate.empty()
,isEmpty
returnsfalse
.I am happy to contribute a PR. Besides contributing a fix for the
isEmpty
check, it would be nice to also fix the composition so that it doesn't apply an operator between two predicates if one of them isempty
.