mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
PseudoFunctionStyleMethodInspection: removed transformation of lambda generating function, fixed most of type parameters issues
This commit is contained in:
+6
-2
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-8
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user