java-topology/test/langtools/tools/javac/T8024207/FlowCrashTest.java
russell@unturf.com 0a580b313d undefect. CWE-407 — 63 sites patched across 27 ecosystems
Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com

Patches, unit tests, benchmarks, whitepaper, and outreach briefs.
Public domain — no copyright claimed. Use freely.
2026-03-26 17:11:57 -04:00

23 lines
674 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8024207
* @summary javac crash in Flow$AssignAnalyzer.visitIdent
* @compile/fail/ref=FlowCrashTest.out -XDrawDiagnostics FlowCrashTest.java
*/
import java.util.*;
import java.util.stream.*;
public class FlowCrashTest {
static class ViewId { }
public void crash() {
Map<ViewId,String> viewToProfile = null;
new TreeMap<>(viewToProfile.entrySet().stream()
.collect(Collectors.toMap((vid, prn) -> prn,
(vid, prn) -> Arrays.asList(vid),
(a, b) -> { a.addAll(b); return a; })));
}
}