780N/A/*
780N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
780N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
780N/A *
780N/A * This code is free software; you can redistribute it and/or modify it
780N/A * under the terms of the GNU General Public License version 2 only, as
780N/A * published by the Free Software Foundation.
780N/A *
780N/A * This code is distributed in the hope that it will be useful, but WITHOUT
780N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
780N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
780N/A * version 2 for more details (a copy is included in the LICENSE file that
780N/A * accompanied this code).
780N/A *
780N/A * You should have received a copy of the GNU General Public License version
780N/A * 2 along with this work; if not, write to the Free Software Foundation,
780N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
780N/A *
780N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
780N/A * or visit www.oracle.com if you need additional information or have any
780N/A * questions.
780N/A */
780N/A
780N/Aimport java.util.*;
780N/A
780N/Aclass SubTest {
780N/A
780N/A interface Foo {}
780N/A static class X1 extends Exception implements Foo {}
780N/A static class X2 extends Exception implements Foo {}
780N/A
780N/A void test(boolean cond, List<String> ls) {
780N/A try {
780N/A if (cond)
780N/A throw new X1();
780N/A else
780N/A throw new X2();
780N/A }
780N/A catch (X1 | X2 ex) {}
780N/A }
780N/A}