8049127: Group 8b - golden files for annotations test in tools/java dir
authorsogoel
Tue, 12 Aug 2014 17:31:31 -0700
changeset 26095 8062f96d3ced
parent 26094 198f355f95aa
child 26096 7368b1ed9450
8049127: Group 8b - golden files for annotations test in tools/java dir Reviewed-by: jjg
langtools/test/tools/javac/annotations/neg/NoAnnotationMethods.java
langtools/test/tools/javac/annotations/neg/NoAnnotationMethods.out
langtools/test/tools/javac/annotations/neg/NoClone.java
langtools/test/tools/javac/annotations/neg/NoClone.out
langtools/test/tools/javac/annotations/neg/NoObjectMethods.java
langtools/test/tools/javac/annotations/neg/NoObjectMethods.out
langtools/test/tools/javac/annotations/neg/ObjectMembers.java
langtools/test/tools/javac/annotations/neg/ObjectMembers.out
langtools/test/tools/javac/annotations/neg/OverrideNo.java
langtools/test/tools/javac/annotations/neg/OverrideNo.out
langtools/test/tools/javac/annotations/neg/Package.java
langtools/test/tools/javac/annotations/neg/Package.out
langtools/test/tools/javac/annotations/neg/Recovery.java
langtools/test/tools/javac/annotations/neg/Recovery.out
langtools/test/tools/javac/annotations/neg/Recovery1.java
langtools/test/tools/javac/annotations/neg/Recovery1.out
langtools/test/tools/javac/annotations/neg/Scope.java
langtools/test/tools/javac/annotations/neg/Scope.out
langtools/test/tools/javac/annotations/neg/Syntax1.java
langtools/test/tools/javac/annotations/neg/Syntax1.out
--- a/langtools/test/tools/javac/annotations/neg/NoAnnotationMethods.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/NoAnnotationMethods.java	Tue Aug 12 17:31:31 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     6393539
  * @summary no compile-time error for clone, etc. in annotation type
  * @author  Peter von der Ah\u00e9
- * @compile/fail NoAnnotationMethods.java
+ * @compile/fail/ref=NoAnnotationMethods.out -XDrawDiagnostics  NoAnnotationMethods.java
  */
 
 public @interface NoAnnotationMethods {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/NoAnnotationMethods.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+NoAnnotationMethods.java:10:9: compiler.err.intf.annotation.member.clash: annotationType(), java.lang.annotation.Annotation
+1 error
--- a/langtools/test/tools/javac/annotations/neg/NoClone.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/NoClone.java	Tue Aug 12 17:31:31 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     6393539
  * @summary no compile-time error for clone, etc. in annotation type
  * @author  Peter von der Ah\u00e9
- * @compile/fail NoClone.java
+ * @compile/fail/ref=NoClone.out -XDrawDiagnostics  NoClone.java
  */
 
 public @interface NoClone {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/NoClone.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,3 @@
+NoClone.java:10:5: compiler.err.invalid.annotation.member.type
+NoClone.java:10:12: compiler.err.intf.annotation.member.clash: clone(), java.lang.Object
+2 errors
--- a/langtools/test/tools/javac/annotations/neg/NoObjectMethods.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/NoObjectMethods.java	Tue Aug 12 17:31:31 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     6393539
  * @summary no compile-time error for clone, etc. in annotation type
  * @author  Peter von der Ah\u00e9
- * @compile/fail NoObjectMethods.java
+ * @compile/fail/ref=NoObjectMethods.out -XDrawDiagnostics  NoObjectMethods.java
  */
 
 public @interface NoObjectMethods {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/NoObjectMethods.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+NoObjectMethods.java:10:9: compiler.err.intf.annotation.member.clash: clone(), java.lang.Object
+1 error
--- a/langtools/test/tools/javac/annotations/neg/ObjectMembers.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/ObjectMembers.java	Tue Aug 12 17:31:31 2014 -0700
@@ -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 4901264
  * @summary JSR175 (2): don't allow annotating members from Object
  * @author gafter
  *
- * @compile/fail ObjectMembers.java
+ * @compile/fail/ref=ObjectMembers.out -XDrawDiagnostics  ObjectMembers.java
  */
 
 @ObjectMembers(hashCode = 23)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/ObjectMembers.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+ObjectMembers.java:10:16: compiler.err.no.annotation.member: hashCode, ObjectMembers
+1 error
--- a/langtools/test/tools/javac/annotations/neg/OverrideNo.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/OverrideNo.java	Tue Aug 12 17:31:31 2014 -0700
@@ -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 4901275 4989669
  * @summary JSR175 (7): implement <at>Overrides
  * @author gafter
  *
- * @compile/fail OverrideNo.java
+ * @compile/fail/ref=OverrideNo.out -XDrawDiagnostics  OverrideNo.java
  */
 
 package overrideNo;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/OverrideNo.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+OverrideNo.java:16:5: compiler.err.method.does.not.override.superclass
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Package.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Package.java	Tue Aug 12 17:31:31 2014 -0700
@@ -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 4901290
  * @summary Package annotations
  * @author gafter
  *
- * @compile/fail Package.java
+ * @compile/fail/ref=Package.out -XDrawDiagnostics  Package.java
  */
 
 @java.lang.annotation.Documented
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Package.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+Package.java:10:1: compiler.err.pkg.annotations.sb.in.package-info.java
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Recovery.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Recovery.java	Tue Aug 12 17:31:31 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 4993451
  * @summary compiler crash with malformed annotations
  * @author gafter
  *
- * @compile/fail Recovery.java
+ * @compile/fail/ref=Recovery.out -XDrawDiagnostics  Recovery.java
  */
 
 import java.lang.annotation.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Recovery.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+Recovery.java:12:2: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.annotation.RetentionPolicy, java.lang.annotation.Annotation)
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Recovery1.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Recovery1.java	Tue Aug 12 17:31:31 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 4963450
  * @summary Assertion error is thrown when an annotation class cannot be found.
  * @author gafter
  *
- * @compile/fail Recovery1.java
+ * @compile/fail/ref=Recovery1.out -XDrawDiagnostics  Recovery1.java
  */
 
 package recovery1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Recovery1.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,4 @@
+Recovery1.java:14:5: compiler.err.cant.resolve.location: kindname.class, Marker, , , (compiler.misc.location: kindname.annotation, recovery1.MyAnnotation, null)
+Recovery1.java:14:30: compiler.err.cant.resolve.location: kindname.class, Marker, , , (compiler.misc.location: kindname.annotation, recovery1.MyAnnotation, null)
+Recovery1.java:18:43: compiler.err.cant.resolve.location.args: kindname.method, markerToo, , , (compiler.misc.location: kindname.annotation, recovery1.MyAnnotation, null)
+3 errors
--- a/langtools/test/tools/javac/annotations/neg/Scope.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Scope.java	Tue Aug 12 17:31:31 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 4901280
  * @summary name lookup scope for annotations
  * @author gafter
  *
- * @compile/fail Scope.java
+ * @compile/fail/ref=Scope.out -XDrawDiagnostics  Scope.java
  */
 
 package annotation.scope;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Scope.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,2 @@
+Scope.java:12:4: compiler.err.cant.resolve: kindname.variable, red, , 
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Syntax1.java	Tue Aug 12 16:41:05 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Syntax1.java	Tue Aug 12 17:31:31 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 4974524
  * @summary compiler crash with ill-formed annotation
  * @author gafter
  *
- * @compile/fail Syntax1.java
+ * @compile/fail/ref=Syntax1.out -XDrawDiagnostics  Syntax1.java
  */
 
 package syntax1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Syntax1.out	Tue Aug 12 17:31:31 2014 -0700
@@ -0,0 +1,4 @@
+Syntax1.java:17:20: compiler.err.annotation.value.must.be.name.value
+Syntax1.java:17:40: compiler.err.annotation.value.must.be.name.value
+Syntax1.java:17:1: compiler.err.annotation.missing.default.value: java.lang.annotation.Target, value
+3 errors