Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object2DArrayAssert#isDeepEqualTo(...) uses reference comparison instead of content comparison #1976

Closed
charphi opened this issue Aug 25, 2020 · 1 comment
Assignees
Milestone

Comments

@charphi
Copy link

charphi commented Aug 25, 2020

In v3.17.0, Object2DArrayAssert#isDeepEqualTo(...) uses reference comparison instead of content comparison.
So, two arrays with same content may be seen as different by assertj.

At line 89, the comparison is done by if (actualSubArray[j] != expectedSubArray[j]) {
but should be if (!Objects.equals(actualSubArray[j], expectedSubArray[j]) {

@scordio scordio self-assigned this Aug 25, 2020
@scordio scordio added this to the 3.17.1 milestone Aug 25, 2020
@scordio
Copy link
Member

scordio commented Aug 25, 2020

Good catch, thank you @charphi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants