8055075: Group 9b: golden files for tests in tools/javac dir
authorsogoel
Fri, 05 Sep 2014 16:43:00 -0700
changeset 26528 a1a7ad15183e
parent 26527 e422a50bf4f9
child 26529 10ec5e52bf75
8055075: Group 9b: golden files for tests in tools/javac dir Reviewed-by: jjg
langtools/test/tools/javac/ConditionalWithVoid.java
langtools/test/tools/javac/ConditionalWithVoid.out
langtools/test/tools/javac/DuplicateClass.java
langtools/test/tools/javac/DuplicateClass.out
langtools/test/tools/javac/EOI.java
langtools/test/tools/javac/EOI.out
langtools/test/tools/javac/ExceptionalFinally2.java
langtools/test/tools/javac/ExceptionalFinally2.out
langtools/test/tools/javac/ExprQualifiedType.java
langtools/test/tools/javac/ExprQualifiedType.out
langtools/test/tools/javac/ExtendsScope.java
langtools/test/tools/javac/ExtendsScope.out
langtools/test/tools/javac/ExtraneousEquals.java
langtools/test/tools/javac/ExtraneousEquals.out
langtools/test/tools/javac/FlatnameClash2.java
langtools/test/tools/javac/FlatnameClash2.out
langtools/test/tools/javac/InconsistentInheritedSignature.java
langtools/test/tools/javac/InconsistentInheritedSignature.out
--- a/langtools/test/tools/javac/ConditionalWithVoid.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/ConditionalWithVoid.java	Fri Sep 05 16:43:00 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 4974927
  * @summary The compiler was allowing void types in its parsing of conditional expressions.
  * @author tball
  *
- * @compile/fail ConditionalWithVoid.java
+ * @compile/fail/ref=ConditionalWithVoid.out -XDrawDiagnostics ConditionalWithVoid.java
  */
 public class ConditionalWithVoid {
     public int test(Object o) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ConditionalWithVoid.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,2 @@
+ConditionalWithVoid.java:12:48: compiler.err.neither.conditional.subtype: java.lang.Integer, void
+1 error
--- a/langtools/test/tools/javac/DuplicateClass.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/DuplicateClass.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2001, 2002, 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 4531500
  * @summary Cascade of problems from duplicate class can cause compiler crash.
  * @author gafter
  *
- * @compile/fail DuplicateClass.java
+ * @compile/fail/ref=DuplicateClass.out -XDrawDiagnostics DuplicateClass.java
  */
 
 /**
@@ -36,7 +13,7 @@
  * processing it.
  */
 public class DuplicateClass {
-    protected void clone() {
+    protected Object clone() {
         super.clone();
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/DuplicateClass.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,2 @@
+DuplicateClass.java:21:8: compiler.err.duplicate.class: DuplicateClass
+1 error
--- a/langtools/test/tools/javac/EOI.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/EOI.java	Fri Sep 05 16:43:00 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 5016879
  * @summary REGRESSION: translation unit ending in identifier crashes javac
  * @author gafter
  *
- * @compile/fail EOI.java
+ * @compile/fail/ref=EOI.out -XDrawDiagnostics EOI.java
  */
 
 class foobar {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/EOI.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,2 @@
+EOI.java:11:1: compiler.err.premature.eof
+1 error
--- a/langtools/test/tools/javac/ExceptionalFinally2.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/ExceptionalFinally2.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2002, 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 4630634
  * @summary missing warn about exception not thrown in try block if finally can't complete
  * @author gafter
  *
- * @compile/fail ExceptionalFinally2.java
+ * @compile/fail/ref=ExceptionalFinally2.out -XDrawDiagnostics ExceptionalFinally2.java
  */
 
 class ExceptionalFinally2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ExceptionalFinally2.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,2 @@
+ExceptionalFinally2.java:22:11: compiler.err.except.never.thrown.in.try: ExceptionalFinally2.E
+1 error
--- a/langtools/test/tools/javac/ExprQualifiedType.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/ExprQualifiedType.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2000, 2001, 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 4347611 4440249 4508227
  * @summary Check that qualified reference to type via an expression does not crash compiler.
  * @author maddox
  *
- * @compile/fail ExprQualifiedType.java
+ * @compile/fail/ref=ExprQualifiedType.out -XDrawDiagnostics ExprQualifiedType.java
  */
 
 public class ExprQualifiedType {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ExprQualifiedType.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,3 @@
+ExprQualifiedType.java:18:9: compiler.err.unexpected.type: kindname.class,kindname.package, kindname.value
+ExprQualifiedType.java:19:9: compiler.err.unexpected.type: kindname.class,kindname.package, kindname.value
+2 errors
--- a/langtools/test/tools/javac/ExtendsScope.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/ExtendsScope.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * Copyright (c) 2002, 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 4402884
  * @summary javac improperly extends superclass's scope to implements clause
  * @author gafter
  *
  * @clean I
- * @compile/fail ExtendsScope.java
+ * @compile/fail/ref=ExtendsScope.out -XDrawDiagnostics ExtendsScope.java
  */
 
 class P {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ExtendsScope.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,2 @@
+ExtendsScope.java:15:30: compiler.err.cant.resolve: kindname.class, I, , 
+1 error
--- a/langtools/test/tools/javac/ExtraneousEquals.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/ExtraneousEquals.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * 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 5019614
  * @summary variance prototype syntax leftover
  *
- * @compile/fail ExtraneousEquals.java
+ * @compile/fail/ref=ExtraneousEquals.out -XDrawDiagnostics ExtraneousEquals.java
  */
 
 public class ExtraneousEquals {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ExtraneousEquals.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,6 @@
+ExtraneousEquals.java:10:23: compiler.err.illegal.start.of.expr
+ExtraneousEquals.java:10:24: compiler.err.illegal.start.of.expr
+ExtraneousEquals.java:10:25: compiler.err.expected: ';'
+ExtraneousEquals.java:10:28: compiler.err.not.stmt
+ExtraneousEquals.java:10:29: compiler.err.expected: ';'
+5 errors
--- a/langtools/test/tools/javac/FlatnameClash2.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/FlatnameClash2.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2002, 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 4629327
  * @summary Compiler crash on explicit use of synthetic name for inner class.
  * @author Neal Gafter
  *
- * @compile/fail FlatnameClash2.java
+ * @compile/fail/ref=FlatnameClash2.out -XDrawDiagnostics FlatnameClash2.java
  */
 
 package tests;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/FlatnameClash2.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,3 @@
+FlatnameClash2.java:32:22: compiler.err.cant.resolve.location: kindname.class, T1$Inner1, , , (compiler.misc.location: kindname.package, tests, null)
+FlatnameClash2.java:28:14: compiler.err.cant.apply.symbol: kindname.method, print, tests.T1.Inner1, tests.T2.Inner2, kindname.class, tests.T1, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: tests.T2.Inner2, tests.T1.Inner1))
+2 errors
--- a/langtools/test/tools/javac/InconsistentInheritedSignature.java	Thu Sep 04 16:52:40 2014 -0700
+++ b/langtools/test/tools/javac/InconsistentInheritedSignature.java	Fri Sep 05 16:43:00 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * Copyright (c) 1997, 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 4041948
  * @summary javac previously allowed interfaces to inherit methods with
  *          inconsistent signatures.
  * @author turnidge
  *
- * @compile/fail InconsistentInheritedSignature.java
+ * @compile/fail/ref=InconsistentInheritedSignature.out -XDrawDiagnostics InconsistentInheritedSignature.java
  */
 interface I1{
   int f();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/InconsistentInheritedSignature.out	Fri Sep 05 16:43:00 2014 -0700
@@ -0,0 +1,2 @@
+InconsistentInheritedSignature.java:17:1: compiler.err.types.incompatible.diff.ret: I2, I1, f()
+1 error