ThrowsConflict.java revision 553:9d9f26857129
185909Simp/* 285909Simp * Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved. 3122116Sbde * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4122116Sbde * 5122116Sbde * This code is free software; you can redistribute it and/or modify it 685909Simp * under the terms of the GNU General Public License version 2 only, as 785909Simp * published by the Free Software Foundation. 885909Simp * 985909Simp * This code is distributed in the hope that it will be useful, but WITHOUT 1085909Simp * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1185909Simp * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1285909Simp * version 2 for more details (a copy is included in the LICENSE file that 1391512Sobrien * accompanied this code). 14116341Smarkm * 1585909Simp * You should have received a copy of the GNU General Public License version 1685909Simp * 2 along with this work; if not, write to the Free Software Foundation, 1785909Simp * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1885909Simp * 19126890Strhodes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20140606Sobrien * or visit www.oracle.com if you need additional information or have any 21126890Strhodes * questions. 22140606Sobrien */ 23140606Sobrien 24140606Sobrien/* 25140606Sobrien * @test 26140606Sobrien * @bug 4022674 27127543Skensmith * @summary Compiler should detect throws-clauses' conflict. 28127204Sobrien * @author turnidge 29136951Sobrien * 30140606Sobrien * @compile/fail ThrowsConflict.java 31127204Sobrien */ 32141782Sobrien 33124834Sruinterface I { 34126890Strhodes void method(); 35124834Sru} 3685909Simp 37126890Strhodesclass A { 38126890Strhodes public void method() throws Exception { 39126890Strhodes } 4085909Simp} 41126890Strhodes 4285909Simppublic 43126890Strhodesclass ThrowsConflict extends A implements I { 44126890Strhodes} 45126890Strhodes