diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/IdeaJdkAnnotationsReflectedTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/IdeaJdkAnnotationsReflectedTest.java index 6610b8d54d8..59b87d71627 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/IdeaJdkAnnotationsReflectedTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/IdeaJdkAnnotationsReflectedTest.java @@ -78,6 +78,11 @@ public class IdeaJdkAnnotationsReflectedTest extends KotlinTestWithEnvironment { for (FqName classFqName : JdkAnnotationsValidityTest.getAffectedClasses("jar://ideaSDK/lib/jdkAnnotations.jar!/")) { if (new FqName("org.jdom").equals(classFqName.parent())) continue; // filter unrelated jdom annotations if (new FqName("java.util.concurrent.TransferQueue").equals(classFqName)) continue; // filter JDK7-specific class + // the following idea annotation is incorrect + // + // + // + if (new FqName("java.io.StringWriter").equals(classFqName)) continue; PsiClass psiClass = javaPsiFacade.findClass(classFqName.asString(), allScope); assertNotNull("Class has annotation, but it is not found: " + classFqName, psiClass); diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java index c60a32f18fc..fa5914ae4b1 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsValidityTest.java @@ -53,9 +53,7 @@ import org.jetbrains.jet.renderer.DescriptorRenderer; import java.io.File; import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -65,6 +63,26 @@ public class JdkAnnotationsValidityTest extends UsefulTestCase { private static final int CLASSES_IN_CHUNK = 500; + // KT-4359 Alternative signature checking problem: Set is incompatible with Set + // + // + // + // + // + // + // + // + // + // + // + // + // + // + // KAnnotator produces above annotations and validation of TabularDataSupport results into: + // public open fun keySet(): jet.MutableSet defined in javax.management.openmbean.TabularDataSupport : + // [Incompatible types in superclasses: [Any?, Any, Any], Incompatible projection kinds in type arguments of super methods' return types: [out Any?, Any, Any]] + private static final Set classesToIgnore = new HashSet(Arrays.asList("javax.management.openmbean.TabularDataSupport")); + private static JetCoreEnvironment createEnvironment(Disposable parentDisposable) { CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( ConfigurationKind.JDK_AND_ANNOTATIONS, TestJdkKind.FULL_JDK, JetTestUtils.getAnnotationsJar()); @@ -152,7 +170,10 @@ public class JdkAnnotationsValidityTest extends UsefulTestCase { String text = StreamUtil.readText(file.getInputStream()); Matcher matcher = Pattern.compile("