diff --git a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java index 01fcccbf1368..49a98fed2b1d 100644 --- a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java @@ -367,15 +367,17 @@ public abstract class UsefulTestCase extends TestCase { assertOrderedCollection(Arrays.asList(collection), checkers); } - public static void assertSameElements(@NotNull T[] collection, @NotNull T... expected) { + public static void assertSameElements(T[] collection, T... expected) { assertSameElements(Arrays.asList(collection), expected); } - public static void assertSameElements(@NotNull Collection collection, @NotNull T... expected) { + public static void assertSameElements(Collection collection, T... expected) { assertSameElements(collection, Arrays.asList(expected)); } - public static void assertSameElements(@NotNull Collection collection, @NotNull Collection expected) { + public static void assertSameElements(Collection collection, Collection expected) { + assertNotNull(collection); + assertNotNull(expected); if (collection.size() != expected.size() || !new HashSet(expected).equals(new HashSet(collection))) { Assert.assertEquals(toString(expected, "\n"), toString(collection, "\n")); Assert.assertEquals(new HashSet(expected), new HashSet(collection));