mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce parameter: extract and delete unused varargs parameter (IDEA-152294)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
class Test {
|
||||
|
||||
void f(String strings) {
|
||||
final String[] strings1 = new String[]{"c", "d"};
|
||||
extract("a", "b", strings1);
|
||||
}
|
||||
|
||||
private static void extract(final String from, final String to, String[] anObject) {
|
||||
|
||||
new Foo(anObject);
|
||||
}
|
||||
|
||||
private static class Foo {
|
||||
public Foo(String[] extensions) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class Test {
|
||||
|
||||
void f(String strings) {
|
||||
final String[] strings1 = new String[]{"c", "d"};
|
||||
final Foo foo = new Foo(strings1);
|
||||
extract("a", "b", foo);
|
||||
}
|
||||
|
||||
private static void extract(final String from, final String to, Foo anObject) {
|
||||
|
||||
}
|
||||
|
||||
private static class Foo {
|
||||
public Foo(String[] extensions) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
|
||||
void f(String strings) {
|
||||
extract("a", "b", "c", "d");
|
||||
}
|
||||
|
||||
private static void extract(final String from, final String to, final String... extensions) {
|
||||
|
||||
new Foo(<selection>extensions</selection>);
|
||||
}
|
||||
|
||||
private static class Foo {
|
||||
public Foo(String[] extensions) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
|
||||
void f(String strings) {
|
||||
extract("a", "b", "c", "d");
|
||||
}
|
||||
|
||||
private static void extract(final String from, final String to, final String... extensions) {
|
||||
|
||||
<selection>new Foo(extensions)</selection>;
|
||||
}
|
||||
|
||||
private static class Foo {
|
||||
public Foo(String[] extensions) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user