markhobson / hamcrest-compose

Hamcrest matchers for composition.
Apache License 2.0
30 stars 6 forks source link

Compose with an empty list of matchers should always match #4

Closed markhobson closed 9 years ago

markhobson commented 9 years ago

3 introduced the compose(List<Matcher<T>>) factory method which currently throws an IAE with an empty list of matchers. This is a reasonable use case when programmatically building composite matchers so we should support this by returning an anything matcher, as per allOf.