[java-intentions] IDEA-249810 Automatically fix closing parentheses in nested calls

GitOrigin-RevId: 9447905d0f2fda68b7f61b9310088b2f109d6b0e
This commit is contained in:
Tagir Valeev
2020-09-03 03:45:03 +00:00
committed by intellij-monorepo-bot
parent a95ed178a6
commit 5b88621295
16 changed files with 353 additions and 2 deletions
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b) {
return s;
}
String bar(String s) {
return s;
}
void test() {
foo(bar("hello"), true);
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String bar(String s) {
return s;
}
void test() {
foo(bar("hello"), true, true);
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String bar(String s) {
return s;
}
void test() {
foo(bar("hello"), true, true);
}
}
@@ -0,0 +1,18 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String bar(String s) {
return s;
}
String bar(String s, boolean b) {
return s;
}
void test() {
foo(bar("hello"), true, true);
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b) {
return s;
}
String bar(String s) {
return s;
}
void test() {
bar(foo("hello", true));
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b) {
return s;
}
String bar(String s) {
return s;
}
void test() {
foo(bar("hello"<caret>, true));
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String bar(String s) {
return s;
}
void test() {
foo(bar("hello", true<caret>), true);
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String bar(String s) {
return s;
}
void test() {
foo(bar("hello", true, <caret>true));
}
}
@@ -0,0 +1,22 @@
// "Fix closing parenthesis placement" "false"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String foo(String s, boolean b) {
return s;
}
String bar(String s) {
return s;
}
String bar(String s, boolean b) {
return s;
}
void test() {
foo(bar("hello", true, <caret>true));
}
}
@@ -0,0 +1,18 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b, boolean c) {
return s;
}
String bar(String s) {
return s;
}
String bar(String s, boolean b) {
return s;
}
void test() {
foo(bar("hello", true, <caret>true));
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "true"
public class Example {
String foo(String s, boolean b) {
return s;
}
String bar(String s) {
return s;
}
void test() {
bar(foo(<caret>"hello"), true);
}
}
@@ -0,0 +1,14 @@
// "Fix closing parenthesis placement" "false"
public class Example {
String foo(String s, boolean b) {
return s;
}
String bar(String s) {
return s;
}
void test() {
bar(foo(<caret>"hello"));
}
}