diff --git a/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.java b/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.java
index cda4cf44be04..4015652f1808 100644
--- a/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.java
+++ b/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.java
@@ -97,9 +97,9 @@ class recentMethod() { }
}
-class CK extends OldKotlinClass {
+class KOverrider extends OldKotlinClass {
- public CK() {
+ public KOverrider() {
//call old available constructor, to not produce warning here.
super(1);
}
@@ -121,6 +121,20 @@ class CK extends OldKotlinClass {
public void recentMethod() { }
}
+//No warning should be produced, because the `Overrider.recentMethod` is not "recent" on its own.
+class JavaNonDirectOverrideOfRecentMethod extends Overrider {
+ @Override
+ public void recentMethod() {
+ }
+}
+
+//No warning should be produced, because the `KOverrider.recentMethod` is not "recent" on its own.
+class KotlinNonDirectOverrideOfRecentMethod extends KOverrider {
+ @Override
+ public void recentMethod() {
+ }
+}
+
class D extends OldClassWithDefaultConstructor {
//implicit call to default "recent" constructor that is NOT available in source code.
}
diff --git a/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.kt b/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.kt
index 6ebaf51716fc..a945b5fc7f88 100644
--- a/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.kt
+++ b/plugins/devkit/devkit-kotlin-tests/testData/inspections/missingApi/plugin/missingApiUsages.kt
@@ -89,16 +89,26 @@ class A {
}
}
-class Overrider : OldClass(42) {
+open class Overrider : OldClass(42) {
//overrides "recent" method.
override fun recentMethod() { }
}
-class KOverrider : OldKotlinClass(42) {
+open class KOverrider : OldKotlinClass(42) {
//overrides "recent" method.
override fun recentMethod() { }
}
+//No warning should be produced, because the `Overrider.recentMethod` is not "recent" on its own.
+class JavaNonDirectOverrideOfRecentMethod : Overrider() {
+ override fun recentMethod() { }
+}
+
+//No warning should be produced, because the `KOverrider.recentMethod` is not "recent" on its own.
+class KotlinNonDirectOverrideOfRecentMethod : KOverrider() {
+ override fun recentMethod() { }
+}
+
class B {
@RecentAnnotation