Inspection to replace !string.isBlank() with string.isNotBlank()
#KT-40769 Fixed
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
f9a2d01d57
commit
d09b20f11d
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isBlank()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isNotBlank()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isNotBlank()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isBlank()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (!s.isBlank()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isBlank()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (!s.isNotBlank()) {
|
||||
foo(1)
|
||||
} else {
|
||||
foo(2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test(s: String) {
|
||||
<caret>if (s.isNotBlank()) {
|
||||
foo(2)
|
||||
} else {
|
||||
foo(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user