PseudoFunctionStyleMethodInspection: removed transformation of lambda generating function, fixed most of type parameters issues

This commit is contained in:
Dmitry Batkovich
2015-07-02 17:09:55 +03:00
parent 4e892c58a2
commit 526af6f1c1
9 changed files with 76 additions and 102 deletions
@@ -1,17 +1,21 @@
import com.google.common.collect.Iterables;
import com.google.common.base.Function;
import java.lang.Iterable;
import java.lang.String;
import java.util.ArrayList;
import java.util.Collections;
class c {
void m() {
Iterables.transf<caret>orm(new ArrayList<>(), getFunction())
Iterable<String> trnsfrmd = Iterables.transf<caret>orm(new ArrayList<>(), getFunction());
}
Function<String, String> getFunction() {
return new Function<String, String>() {
String apply(String s) {
return s.toString().toLowerCase().replace('c', 'h');
}
}
}
}
@@ -1,6 +1,7 @@
import com.google.common.collect.Iterables;
import com.google.common.base.Function;
import java.lang.Iterable;
import java.lang.String;
import java.util.ArrayList;
import java.util.Collections;
@@ -8,13 +9,14 @@ import java.util.stream.Collectors;
class c {
void m() {
Collections.emptyList().stream().map(input -> {
Collectors c;
ArrayList l;
System.out.println(input);
//do something
int i = 1;
return input;
}).collect(Collectors.toList())
Iterable<String> trnsfrmd = new ArrayList<String>().stream().map(getFunction()::apply).collect(Collectors.toList());
}
Function<String, String> getFunction() {
return new Function<String, String>() {
String apply(String s) {
return s.toString().toLowerCase().replace('c', 'h');
}
}
}
}