diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt new file mode 100644 index 00000000000..33378797acf --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt @@ -0,0 +1,8 @@ +// WITH_RUNTIME +import java.util.Arrays + +fun test() { + val a = arrayOf(1, 2, 3) + val b = arrayOf(1, 2, 3) + Arrays.equals(a, b).let { println(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt.after new file mode 100644 index 00000000000..3c0da93797f --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt.after @@ -0,0 +1,8 @@ +// WITH_RUNTIME +import java.util.Arrays + +fun test() { + val a = arrayOf(1, 2, 3) + val b = arrayOf(1, 2, 3) + a.contentEquals(b).let { println(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt new file mode 100644 index 00000000000..f6bda295781 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt @@ -0,0 +1,6 @@ +// WITH_RUNTIME +import java.lang.System.out + +fun x() { + out.print("test") +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt.after new file mode 100644 index 00000000000..1d0dc78af41 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt.after @@ -0,0 +1,6 @@ +// WITH_RUNTIME +import java.lang.System.out + +fun x() { + print("test") +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt new file mode 100644 index 00000000000..591b8f917a0 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt @@ -0,0 +1,8 @@ +// WITH_RUNTIME +import java.lang.System.out + +fun x() { + listOf("") + .take(10) + .forEach { out.print(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt.after new file mode 100644 index 00000000000..18798f5eeb1 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt.after @@ -0,0 +1,8 @@ +// WITH_RUNTIME +import java.lang.System.out + +fun x() { + listOf("") + .take(10) + .forEach { print(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt new file mode 100644 index 00000000000..46449867d2f --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt @@ -0,0 +1,6 @@ +// WITH_RUNTIME +fun x() { + listOf("") + .take(10) + .forEach { System.out.print(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt.after new file mode 100644 index 00000000000..108645383d7 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt.after @@ -0,0 +1,6 @@ +// WITH_RUNTIME +fun x() { + listOf("") + .take(10) + .forEach { print(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt new file mode 100644 index 00000000000..9128cc86d39 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt @@ -0,0 +1,8 @@ +// WITH_RUNTIME +import java.lang.Math.abs + +fun x() { + listOf() + .take(10) + .filter { abs(it) < 10 } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt.after new file mode 100644 index 00000000000..409425aad8e --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt.after @@ -0,0 +1,8 @@ +// WITH_RUNTIME +import java.lang.Math.abs + +fun x() { + listOf() + .take(10) + .filter { kotlin.math.abs(it) < 10 } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt new file mode 100644 index 00000000000..b70487d1752 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt @@ -0,0 +1,6 @@ +// WITH_RUNTIME +fun x() { + listOf() + .take(10) + .filter { Math.abs(it) < 10 } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt.after new file mode 100644 index 00000000000..75142f66774 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt.after @@ -0,0 +1,8 @@ +import kotlin.math.abs + +// WITH_RUNTIME +fun x() { + listOf() + .take(10) + .filter { abs(it) < 10 } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt new file mode 100644 index 00000000000..0ee67aa7be7 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt @@ -0,0 +1,5 @@ +// WITH_RUNTIME +fun x() { + val a = 4 + val b = Math.abs(a).let { println(it) } +} \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt.after b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt.after new file mode 100644 index 00000000000..4f47e209f59 --- /dev/null +++ b/idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt.after @@ -0,0 +1,7 @@ +import kotlin.math.abs + +// WITH_RUNTIME +fun x() { + val a = 4 + val b = abs(a).let { println(it) } +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java index 9cbbb5a4a50..d7f75db2605 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java @@ -9096,6 +9096,11 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals.kt"); } + @TestMetadata("equals2.kt") + public void testEquals2() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equals2.kt"); + } + @TestMetadata("equalsWithNullOther.kt") public void testEqualsWithNullOther() throws Exception { runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/collections/equalsWithNullOther.kt"); @@ -9227,6 +9232,21 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print.kt"); } + @TestMetadata("print2.kt") + public void testPrint2() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print2.kt"); + } + + @TestMetadata("print3.kt") + public void testPrint3() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print3.kt"); + } + + @TestMetadata("print4.kt") + public void testPrint4() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/print4.kt"); + } + @TestMetadata("println.kt") public void testPrintln() throws Exception { runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/io/println.kt"); @@ -9256,6 +9276,21 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs.kt"); } + @TestMetadata("abs2.kt") + public void testAbs2() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs2.kt"); + } + + @TestMetadata("abs3.kt") + public void testAbs3() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs3.kt"); + } + + @TestMetadata("abs4.kt") + public void testAbs4() throws Exception { + runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/abs4.kt"); + } + @TestMetadata("acos.kt") public void testAcos() throws Exception { runTest("idea/testData/inspectionsLocal/replaceJavaStaticMethodWithKotlinAnalog/math/acos.kt");