Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openjdk/test/langtools/tools/javac/multicatch/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 701 B image not shown  

Quelle  Neg03.java   Sprache: JAVA

 
/*
 * @test /nodynamiccopyright/
 * @bug 6943289
 *
 * @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
 * @author mcimadamore
 * @compile/fail/ref=Neg03.out -XDrawDiagnostics Neg03.java
 *
 */


class Neg03 {

    static class A extends Exception { public void m() {}; public Object f;}
    static class B1 extends A {}
    static class B2 extends A {}

    void m() throws B1, B2 {
        try {
            if (true) {
                throw new B1();
            }
            else {
                throw new B2();
            }
        } catch (Exception ex) {
            ex = new B2(); //effectively final analysis disabled!
            throw ex;
        }
    }
}

99%


¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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 ist noch experimentell.