mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
[java-highlighting] Better call type mismatch reporting
GitOrigin-RevId: 1f7240ef2cdad17d78aa0f691b1b5ce3108293b3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a0bc3ee404
commit
b41375447f
@@ -0,0 +1,13 @@
|
||||
// "Adapt lambda return using 'toPath()'" "true-preview"
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Demo {
|
||||
Map<Path, Long> fileSizes(List<File> files) {
|
||||
return files.stream().collect(Collectors.toMap(f -> f.toPath(), f -> f.length()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user