publicclass T6978574 { staticclass A extends Exception { } staticclass B extends Exception { }
staticvoid foo() throws A { thrownew A(); } staticvoid bar() throws B { thrownew B(); }
staticvoid test(boolean b) { try { if (b) foo(); else bar(); return; // This should *not* cause ClassFormatError
} catch (final A | B e ) { caught = true; } return;
}
staticboolean caught = false;
publicstaticvoid main(String[] args) {
test(true); if (!caught) thrownew AssertionError();
caught = false;
test(false); if (!caught) thrownew AssertionError();
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.7 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.