Merge branch 'JDK-8364991' into exhaustiveness-errors

This commit is contained in:
Jan Lahoda 2025-08-07 19:14:48 +02:00
commit 2f569e32f6

View File

@ -1636,10 +1636,11 @@ public class Exhaustiveness extends TestRunner {
// @Test
public void testDeeplyNestedNotExhaustive(Path base) throws Exception {
List<String> variants = createDeeplyNestedVariants().stream().collect(Collectors.toCollection(ArrayList::new));
variants.remove((int) (Math.random() * variants.size()));
int removed = (int) (Math.random() * variants.size());
variants.remove(removed);
String code = testCodeForVariants(variants);
System.err.println("analyzing:");
System.err.println("analyzing (removed: " + removed + "):");
System.err.println(code);
doTest(base,
new String[0],