mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
IDEA-151356 Simplifying known true/false conditions should remove unnecessary parentheses
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
package test;
|
||||
|
||||
public class TestSimplifyIf
|
||||
{
|
||||
void test() {
|
||||
String str = "";
|
||||
if (str.equals("hello") && !str.equals("foo")) {
|
||||
// Nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
package test;
|
||||
|
||||
public class TestSimplifyIf
|
||||
{
|
||||
void test() {
|
||||
String str = "";
|
||||
if ((<caret>false || str.equals("hello")) && !str.equals("foo")) {
|
||||
// Nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user