src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
changeset 48721 ef3557eb4306
parent 48433 04d8d293e458
child 51615 afbb33428df7
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Fri Feb 02 23:21:12 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Fri Feb 02 07:43:54 2018 -0500
@@ -86,6 +86,7 @@
 import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.util.DefinedBy;
 import com.sun.tools.javac.util.DefinedBy.Api;
+import com.sun.tools.javac.util.JCDiagnostic.Warning;
 import com.sun.tools.javac.util.ListBuffer;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.jvm.ModuleNameReader;
@@ -1600,10 +1601,10 @@
         void add(Map<String, List<Path>> map, Path prefix, Path suffix) {
             if (!Files.isDirectory(prefix)) {
                 if (warn) {
-                    String key = Files.exists(prefix)
-                            ? "dir.path.element.not.directory"
-                            : "dir.path.element.not.found";
-                    log.warning(Lint.LintCategory.PATH, key, prefix);
+                    Warning key = Files.exists(prefix)
+                            ? Warnings.DirPathElementNotDirectory(prefix)
+                            : Warnings.DirPathElementNotFound(prefix);
+                    log.warning(Lint.LintCategory.PATH, key);
                 }
                 return;
             }