InlineStreamMapAction: correctly handle lambda parameters with explicit types

This commit is contained in:
Tagir Valeev
2018-09-28 18:15:29 +07:00
parent e182fce12a
commit ca1c783ed1
5 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
// "Inline 'map' body into the next 'forEach' call" "true"
import java.util.List;
public class Main {
public static void test(List<String> list) {
list.stream().forEach((String s) -> System.out.println(s.trim()));
}
}

View File

@@ -0,0 +1,8 @@
// "Inline 'map' body into the next 'forEach' call" "true"
import java.util.List;
public class Main {
public static void test(List<String> list) {
list.stream().forEach(s -> System.out.println(s.trim()));
}
}

View File

@@ -0,0 +1,8 @@
// "Inline 'map' body into the next 'forEach' call" "true"
import java.util.List;
public class Main {
public static void test(List<String> list) {
list.stream().ma<caret>p((String s) -> s.trim()).forEach(x -> System.out.println(x));
}
}

View File

@@ -0,0 +1,8 @@
// "Inline 'map' body into the next 'forEach' call" "true"
import java.util.List;
public class Main {
public static void test(List<String> list) {
list.stream().ma<caret>p(s -> s.trim()).forEach((String x) -> System.out.println(x));
}
}