redundant type args: check also method reference qualifiers

This commit is contained in:
Anna Kozlova
2014-04-11 14:27:27 +02:00
parent d84cfe4661
commit 36466df690
4 changed files with 148 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// "Remove explicit type arguments" "true"
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
class Box<T>
{
public T getValue()
{
return null;
}
void f(Stream<Box<String>> stream) {
List<String> l3 = stream
.map(Box::getValue)
.collect(Collectors.toList());
}
}

View File

@@ -0,0 +1,18 @@
// "Remove explicit type arguments" "true"
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
class Box<T>
{
public T getValue()
{
return null;
}
void f(Stream<Box<String>> stream) {
List<String> l3 = stream
.map(Box<Stri<caret>ng>::getValue)
.collect(Collectors.toList());
}
}