hamcrest / JavaHamcrest

Java (and original) version of Hamcrest
http://hamcrest.org/
BSD 3-Clause "New" or "Revised" License
2.11k stars 379 forks source link

fix: contains/containsInAnyOrder overloading issue #380

Closed gokareless closed 4 months ago

gokareless commented 2 years ago

Fixes #301.

Caused:

Fix:

The assumption is that whenever we get to the contains(T... items) with an array, the only possible way to get there with an array is by passing Object type reference (because of contains overloaded methods). Therefore we can safely add extra-check for embedded array