Inspection: Expression can be folded into Stream chain (IDEA-187123)

This commit is contained in:
Tagir Valeev
2018-03-05 16:33:08 +07:00
parent 874011da51
commit 2c4af2781d
23 changed files with 382 additions and 32 deletions

View File

@@ -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();
}
}