mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 20:30:42 +07:00
don't insert braces around single lambda parameter
This commit is contained in:
@@ -4,6 +4,6 @@ import java.util.stream.IntStream;
|
||||
|
||||
public class Main {
|
||||
public static void test(List<CharSequence> list) {
|
||||
list.stream().map(cs -> (String)cs).mapToInt(String::length).asLongStream().map(x -> x*2).forEach((l) -> System.out.println((Long) l));
|
||||
list.stream().map(cs -> (String)cs).mapToInt(String::length).asLongStream().map(x -> x*2).forEach(l -> System.out.println((Long) l));
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,6 @@ import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public static void test(List<CharSequence> list) {
|
||||
list.stream().map(cs -> cs.subSequence(1, 5)).forEach((charSequence) -> System.out.println(charSequence.length()));
|
||||
list.stream().map(cs -> cs.subSequence(1, 5)).forEach(charSequence -> System.out.println(charSequence.length()));
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,6 @@ import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public static void test(List<CharSequence> list) {
|
||||
list.stream().map((cs) -> cs.subSequence(1, 5).length()).forEach(System.out::println);
|
||||
list.stream().map(cs -> cs.subSequence(1, 5).length()).forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@ import java.util.stream.IntStream;
|
||||
|
||||
public class Main {
|
||||
public static void test(List<CharSequence> list) {
|
||||
list.stream().mapToInt((cs) -> ((String) cs).length()).asLongStream().map(x -> x*2).boxed().forEach(System.out::println);
|
||||
list.stream().mapToInt(cs -> ((String) cs).length()).asLongStream().map(x -> x*2).boxed().forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user