mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
Inspection: Expression can be folded into Stream chain (IDEA-187123)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import java.util.stream.Stream;
|
||||
|
||||
// "Fold expression into Stream chain" "true"
|
||||
class Test {
|
||||
int foo(String a, String b, String c, String d) {
|
||||
return Stream.of(a, b, c, d).mapToInt(String::length).sum();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user