add explicit arguments: eliminate wildcards (IDEA-106741)

This commit is contained in:
anna
2013-12-03 17:35:07 +01:00
parent c7fcf6beca
commit 8b97583179
3 changed files with 25 additions and 1 deletions
@@ -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();
}
}
@@ -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();
}
}