(String[] args)
| 16 | .map(Breakable::work); |
| 17 | } |
| 18 | public static void main(String[] args) { |
| 19 | // No operations are even applied ... |
| 20 | test("A", 1); |
| 21 | test("B", 2); |
| 22 | Stream<Breakable> c = test("C", 3); |
| 23 | test("D", 4); |
| 24 | test("E", 5); |
| 25 | // ... until there's a terminal operation: |
| 26 | System.out.println("Entering try"); |
| 27 | try { |
| 28 | c.forEach(System.out::println); // [1] |
| 29 | } catch(Exception e) { |
| 30 | System.out.println(e.getMessage()); |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | /* Output: |
| 35 | Entering try |
nothing calls this directly
no test coverage detected