8201498: test/langtools/tools/javac/diags/CheckExamples.java 6 errors occurred
authormcimadamore
Fri, 13 Apr 2018 16:23:56 +0100
changeset 49683 fcff2daa6b1e
parent 49682 2918e1146106
child 49684 3cf00fca0fbf
child 49697 59c4713c5d21
8201498: test/langtools/tools/javac/diags/CheckExamples.java 6 errors occurred Summary: Remove duplicate class names in diagnostic examples. Reviewed-by: jlahoda
test/langtools/tools/javac/diags/examples/PreviewPlural/Bar.java
test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java
test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPluralBar.java
test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/Bar.java
test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/PreviewPluralAdditional.java
test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/PreviewPluralAdditionalBar.java
--- a/test/langtools/tools/javac/diags/examples/PreviewPlural/Bar.java	Fri Apr 13 15:29:33 2018 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2018, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-class Bar {
-    Runnable r = () -> {};
-}
--- a/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java	Fri Apr 13 15:29:33 2018 +0800
+++ b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java	Fri Apr 13 16:23:56 2018 +0100
@@ -31,7 +31,7 @@
 
 class PreviewPlural {
     void test() {
-        new Bar();
+        new PreviewPluralBar();
         new ArrayList<>();
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPluralBar.java	Fri Apr 13 16:23:56 2018 +0100
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+class PreviewPluralBar {
+    Runnable r = () -> {};
+}
--- a/test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/Bar.java	Fri Apr 13 15:29:33 2018 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2018, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-import java.util.ArrayList;
-
-class Bar {
-    Runnable r = () -> {};
-    void test() {
-        new ArrayList<>();
-    }
-}
--- a/test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/PreviewPluralAdditional.java	Fri Apr 13 15:29:33 2018 +0800
+++ b/test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/PreviewPluralAdditional.java	Fri Apr 13 16:23:56 2018 +0100
@@ -30,9 +30,9 @@
 
 import java.util.ArrayList;
 
-class PreviewPlural {
+class PreviewPluralAdditional {
     void test() {
-        new Bar();
+        new PreviewPluralAdditionalBar();
         new ArrayList<>();
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/diags/examples/PreviewPluralAdditional/PreviewPluralAdditionalBar.java	Fri Apr 13 16:23:56 2018 +0100
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+import java.util.ArrayList;
+
+class PreviewPluralAdditionalBar {
+    Runnable r = () -> {};
+    void test() {
+        new ArrayList<>();
+    }
+}