changeset 27387:54142fc27e8a

8063039: incorrect message reference or broken message file Reviewed-by: ksrini
author jjg
date Wed, 05 Nov 2014 19:09:09 -0800
parents 784414cffd9a
children d694da45bd7a
files langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties langtools/test/tools/javac/diags/examples/PluginNotFound.java langtools/test/tools/javac/plugin/missing/PluginNotFound.java langtools/test/tools/javac/plugin/missing/PluginNotFound.out
diffstat 6 files changed, 69 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java	Wed Nov 05 08:37:04 2014 -0500
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java	Wed Nov 05 19:09:09 2014 -0800
@@ -191,7 +191,7 @@
             }
         }
         for (List<String> p: pluginsToCall) {
-            Log.instance(context).error("msg.plugin.not.found", p.head);
+            Log.instance(context).error("plugin.not.found", p.head);
         }
     }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Nov 05 08:37:04 2014 -0500
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Nov 05 19:09:09 2014 -0800
@@ -1133,6 +1133,10 @@
 compiler.err.cant.read.file=\
     cannot read: {0}
 
+# 0: string
+compiler.err.plugin.not.found=\
+    plug-in not found: {0}
+
 #####
 
 # Fatal Errors
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Wed Nov 05 08:37:04 2014 -0500
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Wed Nov 05 19:09:09 2014 -0800
@@ -289,8 +289,7 @@
     not a directory: {0}
 javac.err.file.not.file=\
     not a file: {0}
-javac.msg.plugin.not.found=\
-    plug-in not found: {0}
+
 ## messages
 
 javac.msg.usage.header=\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/PluginNotFound.java	Wed Nov 05 19:09:09 2014 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+// key: compiler.err.plugin.not.found
+// options: -Xplugin:MissingPlugin
+
+class PluginNotFound { }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/plugin/missing/PluginNotFound.java	Wed Nov 05 19:09:09 2014 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, 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 8063039
+ * @summary incorrect message reference or broken message file
+ * @compile/fail/ref=PluginNotFound.out -Xplugin:MissingPlugin PluginNotFound.java
+ */
+
+class PluginNotFound { }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/plugin/missing/PluginNotFound.out	Wed Nov 05 19:09:09 2014 -0800
@@ -0,0 +1,2 @@
+error: plug-in not found: MissingPlugin
+1 error