8068463: Group 10c: golden files for tests in tools/javac dir
Reviewed-by: jjg, mcimadamore
--- a/langtools/test/tools/javac/annotations/6359949/T6359949a.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/annotations/6359949/T6359949a.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,31 +1,8 @@
/*
- * Copyright (c) 2006, 2007, 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 6359949
* @summary (at)Override of static shouldn't be accepted (compiler shouldissue an error/warning)
- * @compile/fail T6359949a.java
+ * @compile/fail/ref=T6359949a.out -XDrawDiagnostics T6359949a.java
*/
class Example {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/6359949/T6359949a.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+T6359949a.java:15:5: compiler.err.method.does.not.override.superclass
+1 error
--- a/langtools/test/tools/javac/annotations/default/A.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/annotations/default/A.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,37 +1,12 @@
/*
- * Copyright (c) 2003, 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 4901262
* @summary Constraints regarding annotation defaults
* @author gafter
*
- * @compile A.java
- * @compile B.java
- * @compile C.java
- * @compile/fail Derr.java
- * @compile/fail Eerr.java
+ * @compile A.java B.java C.java
+ * @compile/fail/ref=Derr.out -XDrawDiagnostics Derr.java
+ * @compile/fail/ref=Eerr.out -XDrawDiagnostics Eerr.java
*/
public @interface A {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/default/Derr.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+Derr.java:24:1: compiler.err.annotation.missing.default.value: A, x
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/default/Eerr.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+Eerr.java:24:9: compiler.err.duplicate.annotation.member.value: x, A
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Dep.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Dep.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,34 +1,10 @@
/*
- * Copyright (c) 2003, 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
+ * @test /nodynamiccopyright/
* @bug 4903501
* @summary Please add annotation <at>Deprecated to supplant the javadoc tag
* @author gafter
*
- * @compile/fail -Xlint:dep-ann -Werror Dep.java
- * @compile -Xlint:dep-ann Dep.java
+ * @compile/fail/ref=Dep.out -XDrawDiagnostics -Xlint:dep-ann -Werror Dep.java
*/
/** @deprecated */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Dep.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,4 @@
+Dep.java:11:1: compiler.warn.missing.deprecated.annotation
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/lint/Deprecation.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/lint/Deprecation.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 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 4821359
* @summary Add -Xlint flag
* @author gafter
*
- * @compile/fail -Xlint:deprecation -Werror Deprecation.java
+ * @compile/fail/ref=Deprecation.out -XDrawDiagnostics -Xlint:deprecation -Werror Deprecation.java
*/
/** @deprecated */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lint/Deprecation.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,4 @@
+Deprecation.java:14:17: compiler.warn.has.been.deprecated: A, compiler.misc.unnamed.package
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/lint/FallThrough.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/lint/FallThrough.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 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 4821359 4981267
* @summary Add -Xlint flag
* @author gafter
*
- * @compile/fail -Xlint:fallthrough -Werror FallThrough.java
+ * @compile/fail/ref=FallThrough.out -XDrawDiagnostics -Xlint:fallthrough -Werror FallThrough.java
*/
class FallThrough {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lint/FallThrough.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,4 @@
+FallThrough.java:16:9: compiler.warn.possible.fall-through.into.case
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/lint/Unchecked.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/lint/Unchecked.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 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 4821359
* @summary Add -Xlint flag
* @author gafter
*
- * @compile/fail -Xlint:unchecked -Werror Unchecked.java
+ * @compile/fail/ref=Unchecked.out -XDrawDiagnostics -Xlint:unchecked -Werror Unchecked.java
*/
class Unchecked<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lint/Unchecked.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,4 @@
+Unchecked.java:12:32: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), Unchecked, Unchecked<java.lang.String>
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/staticImport/Ambig1.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/Ambig1.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 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 4929736
* @summary Missing ambiguity error when two methods are equally specific
* @author gafter
*
- * @compile/fail Ambig1.java
+ * @compile/fail/ref=Ambig1.out -XDrawDiagnostics Ambig1.java
*/
package ambig1;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/staticImport/Ambig1.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+Ambig1.java:24:9: compiler.err.ref.ambiguous: f, kindname.method, f(int), ambig1.B, kindname.method, f(int), ambig1.A
+1 error
--- a/langtools/test/tools/javac/staticImport/ImportPrivate.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/ImportPrivate.java Tue Jan 27 15:11:57 2015 -0800
@@ -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 4979456
* @summary NPE while compiling static import of inaccessible class member
* @author gafter
*
- * @compile/fail ImportPrivate.java
+ * @compile/fail/ref=ImportPrivate.out -XDrawDiagnostics ImportPrivate.java
*/
package importPrivate;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/staticImport/ImportPrivate.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,3 @@
+ImportPrivate.java:12:1: compiler.err.cant.resolve.location: kindname.static, m, , , kindname.class, importPrivate.A
+ImportPrivate.java:22:9: compiler.err.cant.resolve.location.args: kindname.method, m, , , (compiler.misc.location: kindname.class, importPrivate.MyTest, null)
+2 errors
--- a/langtools/test/tools/javac/staticImport/PrivateStaticImport.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/PrivateStaticImport.java Tue Jan 27 15:11:57 2015 -0800
@@ -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 4912075
* @summary static import of private field crashes compiler
* @author gafter
*
- * @compile/fail PrivateStaticImport.java
+ * @compile/fail/ref=PrivateStaticImport.out -XDrawDiagnostics PrivateStaticImport.java
*/
package psi;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/staticImport/PrivateStaticImport.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+PrivateStaticImport.java:18:17: compiler.err.cant.resolve.location: kindname.variable, FOO_VALUE, , , (compiler.misc.location: kindname.class, psi.Bar, null)
+1 error
--- a/langtools/test/tools/javac/staticImport/Shadow.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/Shadow.java Tue Jan 27 15:11:57 2015 -0800
@@ -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 5017254
* @summary compiler fails to shadow inapplicable method with static import
* @author gafter
*
- * @compile/fail Shadow.java
+ * @compile/fail/ref=Shadow.out -XDrawDiagnostics Shadow.java
*/
package shadow;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/staticImport/Shadow.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+Shadow.java:25:9: compiler.err.cant.apply.symbol: kindname.method, m1, int, compiler.misc.no.args, kindname.class, shadow.T2, (compiler.misc.arg.length.mismatch)
+1 error
--- a/langtools/test/tools/javac/staticImport/StaticImport2.java Wed Jul 05 20:16:23 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/StaticImport2.java Tue Jan 27 15:11:57 2015 -0800
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 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 4855358
* @summary add support for JSR 201's static import facility
* @author gafter
*
- * @compile/fail StaticImport2.java
+ * @compile/fail/ref=StaticImport2.out -XDrawDiagnostics StaticImport2.java
*/
package p;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/staticImport/StaticImport2.out Tue Jan 27 15:11:57 2015 -0800
@@ -0,0 +1,2 @@
+StaticImport2.java:24:17: compiler.err.ref.ambiguous: K, kindname.variable, K, p.B, kindname.variable, K, p.A
+1 error