()
| 44 | } |
| 45 | |
| 46 | public static String testSwitch() { |
| 47 | return switch ((int) Math.round(Math.random() * 100)) { |
| 48 | case 10 -> { |
| 49 | String nested = "Test"; |
| 50 | yield switch (nested) { |
| 51 | case "NotTest" -> "NotTest"; |
| 52 | default -> throw new IllegalStateException("Unexpected value: " + "Test"); |
| 53 | }; |
| 54 | } |
| 55 | default -> "Not 10"; |
| 56 | }; |
| 57 | } |
| 58 | |
| 59 | public static int testGenerics() throws ExecutionException, InterruptedException { |
| 60 | int output = CompletableFuture.supplyAsync(() -> 5) |
nothing calls this directly
no outgoing calls
no test coverage detected