src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LibProvidersLookup.java
branchJDK-8200758-branch
changeset 58670 6fb9e12d5595
parent 58417 67ffaf3a2b75
equal deleted inserted replaced
58648:3bf53ffa9ae7 58670:6fb9e12d5595
    50         return this;
    50         return this;
    51     }
    51     }
    52 
    52 
    53     List<String> execute(Path root) throws IOException {
    53     List<String> execute(Path root) throws IOException {
    54         // Get the list of files in the root for which to look up for needed shared libraries
    54         // Get the list of files in the root for which to look up for needed shared libraries
    55         List<Path> allPackageFiles = Files.walk(root).filter(
    55         List<Path> allPackageFiles;
    56                 Files::isRegularFile).filter(LibProvidersLookup::canDependOnLibs).collect(
    56         try (Stream<Path> stream = Files.walk(root)) {
    57                 Collectors.toList());
    57             allPackageFiles = stream.filter(Files::isRegularFile).filter(
       
    58                     LibProvidersLookup::canDependOnLibs).collect(
       
    59                     Collectors.toList());
       
    60         }
    58 
    61 
    59         Collection<Path> neededLibs = getNeededLibsForFiles(allPackageFiles);
    62         Collection<Path> neededLibs = getNeededLibsForFiles(allPackageFiles);
    60 
    63 
    61         // Get the list of unique package names.
    64         // Get the list of unique package names.
    62         List<String> neededPackages = neededLibs.stream().map(libPath -> {
    65         List<String> neededPackages = neededLibs.stream().map(libPath -> {