src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
changeset 48721 ef3557eb4306
parent 48433 04d8d293e458
child 51615 afbb33428df7
equal deleted inserted replaced
48720:290b480df13e 48721:ef3557eb4306
    84 import com.sun.tools.javac.main.Option;
    84 import com.sun.tools.javac.main.Option;
    85 import com.sun.tools.javac.resources.CompilerProperties.Errors;
    85 import com.sun.tools.javac.resources.CompilerProperties.Errors;
    86 import com.sun.tools.javac.resources.CompilerProperties.Warnings;
    86 import com.sun.tools.javac.resources.CompilerProperties.Warnings;
    87 import com.sun.tools.javac.util.DefinedBy;
    87 import com.sun.tools.javac.util.DefinedBy;
    88 import com.sun.tools.javac.util.DefinedBy.Api;
    88 import com.sun.tools.javac.util.DefinedBy.Api;
       
    89 import com.sun.tools.javac.util.JCDiagnostic.Warning;
    89 import com.sun.tools.javac.util.ListBuffer;
    90 import com.sun.tools.javac.util.ListBuffer;
    90 import com.sun.tools.javac.util.Log;
    91 import com.sun.tools.javac.util.Log;
    91 import com.sun.tools.javac.jvm.ModuleNameReader;
    92 import com.sun.tools.javac.jvm.ModuleNameReader;
    92 import com.sun.tools.javac.util.Iterators;
    93 import com.sun.tools.javac.util.Iterators;
    93 import com.sun.tools.javac.util.Pair;
    94 import com.sun.tools.javac.util.Pair;
  1598         }
  1599         }
  1599 
  1600 
  1600         void add(Map<String, List<Path>> map, Path prefix, Path suffix) {
  1601         void add(Map<String, List<Path>> map, Path prefix, Path suffix) {
  1601             if (!Files.isDirectory(prefix)) {
  1602             if (!Files.isDirectory(prefix)) {
  1602                 if (warn) {
  1603                 if (warn) {
  1603                     String key = Files.exists(prefix)
  1604                     Warning key = Files.exists(prefix)
  1604                             ? "dir.path.element.not.directory"
  1605                             ? Warnings.DirPathElementNotDirectory(prefix)
  1605                             : "dir.path.element.not.found";
  1606                             : Warnings.DirPathElementNotFound(prefix);
  1606                     log.warning(Lint.LintCategory.PATH, key, prefix);
  1607                     log.warning(Lint.LintCategory.PATH, key);
  1607                 }
  1608                 }
  1608                 return;
  1609                 return;
  1609             }
  1610             }
  1610             try (DirectoryStream<Path> stream = Files.newDirectoryStream(prefix, path -> Files.isDirectory(path))) {
  1611             try (DirectoryStream<Path> stream = Files.newDirectoryStream(prefix, path -> Files.isDirectory(path))) {
  1611                 for (Path entry: stream) {
  1612                 for (Path entry: stream) {