mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-07-25 20:36:22 +07:00
"push condition inside call" intention replaced with "Conditional can be pushed inside branch" inspection
This commit is contained in:
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "true"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = foo(b ? "true" : "false");
|
||||
}
|
||||
String foo(String p) {return p;}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "true"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = foo(b ? "true" : "false", true).substring(0);
|
||||
}
|
||||
String foo(String p, boolean b) {return p;}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "true"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = foo("true", true).substring(b ? 1 : 2).substring(0);
|
||||
}
|
||||
String foo(String p, boolean b) {return p;}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "true"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = b <caret>? foo("true") : foo("false");
|
||||
}
|
||||
String foo(String p) {return p;}
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "false"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = b <caret>? foo("true") : foo(false);
|
||||
}
|
||||
String foo(String p) {return p;}
|
||||
String foo(boolean b) {return "false";}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "true"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = b <caret>? foo("true", true).substring(0) : foo("false", true).substring(0);
|
||||
}
|
||||
String foo(String p, boolean b) {return p;}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "false"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = b <caret>? foo("true", true).substring(0) : foo("false", true).substring(1);
|
||||
}
|
||||
String foo(String p, boolean b) {return p;}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "true"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = b <caret>? foo("true", true).substring(1).substring(0) : foo("true", true).substring(2).substring(0);
|
||||
}
|
||||
String foo(String p, boolean b) {return p;}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// "Push condition 'b' inside method call" "false"
|
||||
class Foo {
|
||||
void bar(boolean b){
|
||||
String s = b <caret>? foo("true", true) : foo("false", false);
|
||||
}
|
||||
String foo(String p, boolean b) {return p;}
|
||||
}
|
||||
Reference in New Issue
Block a user