# HG changeset patch # User sogoel # Date 1401990278 25200 # Node ID f940af3221e2652e0eb605a8b5b7398eb7a78692 # Parent ff348aab3b5408754848b75195993474ce4f22da 8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir Reviewed-by: jjg diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/CaptureInSubtype.java --- a/langtools/test/tools/javac/CaptureInSubtype.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/CaptureInSubtype.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 5044157 + * @test /nodynamiccopyright/ + * @bug 5044626 * @summary type system loophole in wildcard substitution * @author Gilad Bracha * - * @compile/fail CaptureInSubtype.java + * @compile/fail/ref=CaptureInSubtype.out -XDrawDiagnostics CaptureInSubtype.java */ import java.util.List; diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/CaptureInSubtype.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/CaptureInSubtype.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +CaptureInSubtype.java:38:17: compiler.err.override.incompatible.ret: (compiler.misc.cant.override: m(), CaptureInSubtype.ShowFlaw, m(), CaptureInSubtype.SuperOfShowFlaw), CaptureInSubtype.Flaw, CaptureInSubtype.SuperOfFlaw> +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/capture/Capture2.java --- a/langtools/test/tools/javac/capture/Capture2.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/capture/Capture2.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test + * @test /nodynamiccopyright/ * @bug 5029773 - * @summary soundness problem with failure to subsitute wildcard as type formal argument + * @summary soundness problem with failure to substitute wildcard as type formal argument * @author gafter * - * @compile/fail Capture2.java + * @compile/fail/ref=Capture2.out -XDrawDiagnostics Capture2.java */ package capture2; diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/capture/Capture2.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/capture/Capture2.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +Capture2.java:17:23: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.captureof: 1, ?, T) +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/capture/Martin.java --- a/langtools/test/tools/javac/capture/Martin.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/capture/Martin.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,32 +1,9 @@ -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - /** - * @test + * @test /nodynamiccopyright/ * @bug 6384510 * @summary improper handling of wildcard captures * @author Martin Buchholz - * @compile/fail Martin.java + * @compile/fail/ref=Martin.out -XDrawDiagnostics Martin.java */ import java.util.List; diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/capture/Martin.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/capture/Martin.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +Martin.java:15:11: compiler.err.cant.apply.symbols: kindname.method, addAll, java.util.List,{(compiler.misc.inapplicable.method: kindname.method, java.util.Collection, addAll(java.util.Collection), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.List, java.util.Collection))),(compiler.misc.inapplicable.method: kindname.method, java.util.List, addAll(java.util.Collection), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.List, java.util.Collection))),(compiler.misc.inapplicable.method: kindname.method, java.util.List, addAll(int,java.util.Collection), (compiler.misc.arg.length.mismatch))} +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/capture/T6594284.java --- a/langtools/test/tools/javac/capture/T6594284.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/capture/T6594284.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test + * @test /nodynamiccopyright/ * @bug 6594284 * @summary NPE thrown when calling a method on an intersection type * @author Maurizio Cimadamore * - * @compile/fail T6594284.java + * @compile/fail/ref=T6594284.out -XDrawDiagnostics T6594284.java */ public class T6594284 { diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/capture/T6594284.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/capture/T6594284.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +T6594284.java:18:24: compiler.err.not.within.bounds: ? extends T6594284.E, T +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/5064736/T5064736.java --- a/langtools/test/tools/javac/cast/5064736/T5064736.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/cast/5064736/T5064736.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,31 +1,8 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test + * @test /nodynamiccopyright/ * @bug 5064736 * @summary Incompatible types are cast without error - * @compile/fail T5064736.java + * @compile/fail/ref=T5064736.out -XDrawDiagnostics T5064736.java */ public class T5064736 { diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/5064736/T5064736.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/5064736/T5064736.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +T5064736.java:14:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T5064736.Foo, T5064736.Foo) +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/6219964/T6219964.java --- a/langtools/test/tools/javac/cast/6219964/T6219964.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/cast/6219964/T6219964.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,31 +1,8 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test + * @test /nodynamiccopyright/ * @bug 6219964 * @summary Compiler allows illegal cast of anonymous inner class - * @compile/fail T6219964.java + * @compile/fail/ref=T6219964.out -XDrawDiagnostics T6219964.java */ public class T6219964 { diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/6219964/T6219964.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/6219964/T6219964.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +T6219964.java:13:27: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: java.lang.Object, T6219964.I) +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/6302956/T6302956.java --- a/langtools/test/tools/javac/cast/6302956/T6302956.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/cast/6302956/T6302956.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,31 +1,8 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test + * @test /nodynamiccopyright/ * @bug 6302956 * @summary Illegal cast allowed Properties -> Map - * @compile/fail T6302956.java + * @compile/fail/ref=T6302956.out -XDrawDiagnostics T6302956.java */ import java.util.Map; diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/6302956/T6302956.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/6302956/T6302956.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +T6302956.java:12:57: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.util.Properties, java.util.Map) +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/6548436/T6548436d.java --- a/langtools/test/tools/javac/cast/6548436/T6548436d.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/cast/6548436/T6548436d.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6548436 + * @test /nodynamiccopyright/ + * @bug 6548436 * @summary Incorrect inconvertible types error * @author Maurizio Cimadamore * - * @compile/fail T6548436d.java + * @compile/fail/ref=T6548436d.out -XDrawDiagnostics T6548436d.java */ public class T6548436d { diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/6548436/T6548436d.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/6548436/T6548436d.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +T6548436d.java:15:35: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T6548436d.Base, T6548436d.Base) +1 error diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/BoxedArray.java --- a/langtools/test/tools/javac/cast/BoxedArray.java Thu Jun 05 12:21:38 2014 +0100 +++ b/langtools/test/tools/javac/cast/BoxedArray.java Thu Jun 05 10:44:38 2014 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test + * @test /nodynamiccopyright/ * @bug 5014309 * @summary REGRESSION: compiler allows cast from Integer[] to int[] * @author gafter * - * @compile/fail BoxedArray.java + * @compile/fail/ref=BoxedArray.out -XDrawDiagnostics BoxedArray.java */ public class BoxedArray { diff -r ff348aab3b54 -r f940af3221e2 langtools/test/tools/javac/cast/BoxedArray.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/cast/BoxedArray.out Thu Jun 05 10:44:38 2014 -0700 @@ -0,0 +1,2 @@ +BoxedArray.java:13:22: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.Integer[], int[]) +1 error