mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
assertEquals between incompatible types: ignore collections (IDEA-197547)
This commit is contained in:
+1
-1
@@ -195,7 +195,7 @@ public class AssertHint {
|
||||
if (!objectType.equals(parameterType1) || !objectType.equals(parameterType2)) {
|
||||
return null;
|
||||
}
|
||||
if (TypeUtils.areConvertible(type1, type2)) {
|
||||
if (TypeUtils.areConvertible(type1, type2) || TypeUtils.mayBeEqualByContract(type1, type2)) {
|
||||
return null;
|
||||
}
|
||||
final String comparedTypeText = type1.getPresentableText();
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ public class AssertEqualsBetweenInconvertibleTypes {
|
||||
Collection<B> c2 = null;
|
||||
assertEquals(c1, c2);
|
||||
assertEquals(new ArrayList<String>(){}, new ArrayList<String>());
|
||||
assertEquals(new TreeSet<String>(){}, new HashSet<String>());
|
||||
}
|
||||
|
||||
interface A {}
|
||||
|
||||
Reference in New Issue
Block a user