File: Bug578145NestedLambda.java

package info (click to toggle)
eclipse-jdt-debug 4.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,876 kB
  • sloc: java: 234,390; xml: 6,367; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;

public class Bug578145NestedLambda {

	public static void main(String[] args) {
		int numberInMain = 1;

		Consumer<Integer> myConsumer = (id) -> {
			int numberInExternalLambda = 10;

			List<String> users = Arrays.asList("Lambda");
			users.stream().forEach(u -> {
				int numberInInnerLambda = 100;
				System.out.println("user name: " + u); // Add a breakpoint here
			});
		};
		myConsumer.accept(numberInMain);
	}
}