mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 15:35:40 +07:00
[java] IDEA-256275 Improve Remove-redundant-argument-to-call quick-fix so it can handle redundant arguments not only at the end of argument list
#IDEA-256275 Fixed Merge-request: IJ-MR-177887 Merged-by: Marcin Mikosik <marcin.mikosik@jetbrains.com> GitOrigin-RevId: 156ea485dd409ef5ec937da1872f97ede359bdff
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9950569576
commit
bc62ddef92
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(int, T...)'" "true-preview"
|
||||
class A {
|
||||
public void foo() {
|
||||
method(1, "def", 2);
|
||||
}
|
||||
|
||||
private <T> void method(int i, T... ts) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant arguments to call 'method(boolean, T...)'" "true-preview"
|
||||
class A {
|
||||
public void foo() {
|
||||
method(true, 7);
|
||||
}
|
||||
|
||||
private <T extends Number> void method(boolean b, T... ts) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method("abc");
|
||||
}
|
||||
|
||||
private void method(String string) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(int, String)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>5, "abc");
|
||||
}
|
||||
|
||||
private void method(int i, String string) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>"abc", "def");
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method("abc", "def");
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method("abc", "def");
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(new String[] {"abc", "def"});
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(int, T...)'" "true-preview"
|
||||
class A {
|
||||
public void foo() {
|
||||
method(<caret>"abc", 1, "def", 2);
|
||||
}
|
||||
|
||||
private <T> void method(int i, T... ts) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant arguments to call 'method(boolean, T...)'" "true-preview"
|
||||
class A {
|
||||
public void foo() {
|
||||
method(<caret>"abc", true, 7, "def");
|
||||
}
|
||||
|
||||
private <T extends Number> void method(boolean b, T... ts) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>5, "abc");
|
||||
}
|
||||
|
||||
private void method(String string) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(int, String)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>5, true, "abc");
|
||||
}
|
||||
|
||||
private void method(int i, String string) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>"abc", "def", 5);
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>5, "abc", "def");
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>"abc", "def", 5);
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant argument to call 'method(String...)'" "true-preview"
|
||||
class A {
|
||||
public A() {
|
||||
method(<caret>5, new String[] {"abc", "def"});
|
||||
}
|
||||
|
||||
private void method(String... strings) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user