mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[java-inspections] LambdaUtil#isSafeLambdaReplacement: check whether functional interface type matches exactly
GitOrigin-RevId: 04b67615268182a09ce3a211547dc8213997eb58
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5eb047fe70
commit
308d1fd0e6
@@ -5,7 +5,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
class Test {
|
||||
public static <T> List<TokenFilter<T>> fromString(final T src, Function<T, List<String>> extractor) {
|
||||
final List<TokenFilter<T>> result = extractor.apply(src).stream().map((Function<String, TokenFilter<T>>) TokenFilter::new).collect(Collectors.toList());
|
||||
final List<TokenFilter<T>> result = extractor.apply(src).stream().map(st -> new TokenFilter<T>(st)).collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user