Merge pull request #1627 from cal101/erefactor/v5-dev-project/1/jdt/jdt-InvertEqualsCleanUp

[cleanup] erefactor/EclipseJdt - Invert equals arguments if parameter…
This commit is contained in:
Golden Looly
2021-06-07 00:22:11 +08:00
committed by GitHub
8 changed files with 18 additions and 18 deletions

View File

@@ -102,7 +102,7 @@ public class CollUtilTest {
Collection<String> union = CollUtil.union(list1, list2);
Assert.assertEquals(3, CollUtil.count(union, t -> t.equals("b")));
Assert.assertEquals(3, CollUtil.count(union, t -> "b".equals(t)));
}
@Test
@@ -111,7 +111,7 @@ public class CollUtilTest {
ArrayList<String> list2 = CollUtil.newArrayList("a", "b", "b", "b", "c", "d");
Collection<String> intersection = CollUtil.intersection(list1, list2);
Assert.assertEquals(2, CollUtil.count(intersection, t -> t.equals("b")));
Assert.assertEquals(2, CollUtil.count(intersection, t -> "b".equals(t)));
}
@Test
@@ -236,7 +236,7 @@ public class CollUtilTest {
final String[] result = new String[1];
CollUtil.forEach(map, (key, value, index) -> {
if (key.equals("a")) {
if ("a".equals(key)) {
result[0] = value;
}
});