Replace popup with several quick-fixes in ReplaceJavaStaticMethodWithKotlinAnalog
This commit is contained in:
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with `listOf` function
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with `listOf` function
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with `mutableListOf` function
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
val a = Arrays.<caret>asList(1, 3, null)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with `mutableListOf` function
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
val a = mutableListOf(1, 3, null)
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
// FIX: Replace with `mtableSetOf` function
|
||||
|
||||
fun test() {
|
||||
val a = java.util.Set.of<caret><String>()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
// FIX: Replace with `mtableSetOf` function
|
||||
|
||||
fun test() {
|
||||
val a = mutableSetOf<String>()
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
// FIX: Replace with `setOf` function
|
||||
|
||||
fun test() {
|
||||
val a = java.util.Set.of<caret><String>()
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
// FIX: Replace with `setOf` function
|
||||
|
||||
fun test() {
|
||||
val a = setOf<String>()
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
// FIX: Replace with `setOf` function
|
||||
|
||||
fun test() {
|
||||
val a = java.util.Set.of<caret>("sfsf", 25)
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
// FIX: Replace with `setOf` function
|
||||
|
||||
fun test() {
|
||||
val a = setOf("sfsf", 25)
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIX: Replace with `roundToInt` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.round(x)
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
// FIX: Replace with `roundToInt` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
x.roundToInt()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// FIX: Replace with `roundToLong` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.round(x)
|
||||
}
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
// FIX: Replace with `roundToLong` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
x.roundToLong()
|
||||
Reference in New Issue
Block a user