mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 21:44:49 +07:00
don't insert braces around single lambda parameter
This commit is contained in:
+1
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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()));
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,6 +5,6 @@ import java.util.Objects;
|
||||
|
||||
public class Main {
|
||||
void test(List<String> list) {
|
||||
list.stream().filter((o) -> Objects.nonNull(o) && o.isEmpty()).forEach(System.out::println);
|
||||
list.stream().filter(o -> Objects.nonNull(o) && o.isEmpty()).forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user