jjg@464: /* ohair@554: * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. jjg@464: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@464: * jjg@464: * This code is free software; you can redistribute it and/or modify it jjg@464: * under the terms of the GNU General Public License version 2 only, as jjg@464: * published by the Free Software Foundation. jjg@464: * jjg@464: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@464: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@464: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@464: * version 2 for more details (a copy is included in the LICENSE file that jjg@464: * accompanied this code). jjg@464: * jjg@464: * You should have received a copy of the GNU General Public License version jjg@464: * 2 along with this work; if not, write to the Free Software Foundation, jjg@464: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@464: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. jjg@464: */ jjg@464: jjg@464: /* jjg@464: * @test jjg@464: * @bug 6326754 jjg@464: * @summary Compiler will fail to handle -Xmaxerrs with -ve numbers jjg@464: * jjg@464: * @compile/fail/ref=T6326754.out -XDrawDiagnostics -Xmaxerrs -1 T6326754.java jjg@464: * @compile/fail/ref=T6326754.out -XDrawDiagnostics -Xmaxerrs 0 T6326754.java jjg@464: * @compile/fail/ref=T6326754.out -XDrawDiagnostics -Xmaxerrs 10 T6326754.java jjg@464: * @compile/fail/ref=T6326754.out -XDrawDiagnostics T6326754.java jjg@464: */ jjg@464: class TestConstructor{ jjg@464: T t; jjg@464: K k; jjg@464: public TestConstructor(T t,K k){ jjg@464: this.t =t; jjg@464: } jjg@464: public TestConstructor(K k){ jjg@464: this.k = k; jjg@464: this.t = null; jjg@464: } jjg@464: public TestConstructor(T t){ jjg@464: this.t=t; jjg@464: this.k=null; jjg@464: } jjg@464: public void setT(T t){ jjg@464: this.t=t; jjg@464: this.k=null; jjg@464: } jjg@464: public void setT(K k){ jjg@464: this.k = k; jjg@464: this.t = null; jjg@464: } jjg@464: public void setT(T t,K k){ jjg@464: this.t = t; jjg@464: this.k = k; jjg@464: } jjg@464: } jjg@464: class TestC{ jjg@464: T t; jjg@464: public void setT(T t){ jjg@464: this.t = t; jjg@464: } jjg@464: } jjg@464: public class T6326754{ jjg@464: public static void main(String... arg){ jjg@464: TestC tC =new TestC(); jjg@464: tC.setT(); jjg@464: TestConstructor tc = new TestConstructor("saaa"); jjg@464: tc.setT("sasa"); jjg@464: TestC tC1 = new TestC(); jjg@464: tC1.setT(545); jjg@464: } jjg@464: }