IDEA-17535 Quickfix to remove extra argument in method call implemented

This commit is contained in:
Danila Ponomarenko
2012-05-10 17:57:58 +04:00
parent 2c4ee95b5f
commit 6b29efe29a
10 changed files with 203 additions and 1 deletions
@@ -0,0 +1,9 @@
// "Remove redundant arguments to match 'method(int, Integer)'" "true"
class A {
public A() {
method(new Integer(5), 5);
}
private void method(int i, Integer i2) {
}
}
@@ -0,0 +1,9 @@
// "Remove redundant arguments to match 'method(int, T)'" "true"
class A {
public A() {
method(5, new Exception());
}
private <T extends Exception> void method(int i, T t) {
}
}
@@ -0,0 +1,9 @@
// "Remove redundant arguments to match 'method(int, String)'" "true"
class A {
public A() {
method(5, "");
}
private void method(int s, String s2) {
}
}
@@ -0,0 +1,9 @@
// "Remove redundant arguments to match 'method(int, Integer)'" "true"
class A {
public A() {
method(new Integer(5), 5,<caret> "", new String());
}
private void method(int i, Integer i2) {
}
}
@@ -0,0 +1,9 @@
// "Remove redundant arguments to match 'method(int, T)'" "true"
class A {
public A() {
method(5,<caret> new Exception(), new Exception(), "", 3);
}
private <T extends Exception> void method(int i, T t) {
}
}
@@ -0,0 +1,9 @@
// "Remove redundant arguments to match 'method(int, String)'" "true"
class A {
public A() {
method(5, "",<caret> 10);
}
private void method(int s, String s2) {
}
}