Open
Description
Version
main branch
Describe what's wrong
The following test will fail due to the fact that for Objects.equals
, a collection with the same elements but different sequence are not equal
.
List<String> tags = Lists.newArrayList("tag1", "tag2");
List<String> tagValues = Lists.newArrayList("tag2", "tag1");
Assertions.assertTrue(Objects.equals(tags, tagValues));
There are a lot of method equals
using Objects.equals
to compare collection.
gravitino/core/src/main/java/org/apache/gravitino/meta/UserEntity.java
Lines 158 to 169 in 0616fbc
We can use apache common-collection4 CollectionUtils.isEqualCollection to replace Object.equals
for collection value.
Error message and/or stacktrace
Please see above
How to reproduce
please see above
Additional context
No response
Activity