mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
add explicit arguments: eliminate wildcards (IDEA-106741)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Add explicit type arguments" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
static class A {}
|
||||
static class B extends A {}
|
||||
|
||||
|
||||
public Collection<? extends A> run(boolean flag) {
|
||||
return flag ? Collections.singletonList(new B()) : Collections.<A>emptyList();
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Add explicit type arguments" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
static class A {}
|
||||
static class B extends A {}
|
||||
|
||||
|
||||
public Collection<? extends A> run(boolean flag) {
|
||||
return flag ? Collections.singletonList(new B()) : Collections.<caret>emptyList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user