src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java
branchJDK-8200758-branch
changeset 58670 6fb9e12d5595
parent 58415 73f8e557549a
child 58695 64adf683bc7b
equal deleted inserted replaced
58648:3bf53ffa9ae7 58670:6fb9e12d5595
    48 import java.util.function.Function;
    48 import java.util.function.Function;
    49 import java.util.jar.Attributes;
    49 import java.util.jar.Attributes;
    50 import java.util.jar.JarFile;
    50 import java.util.jar.JarFile;
    51 import java.util.jar.Manifest;
    51 import java.util.jar.Manifest;
    52 import java.util.stream.Collectors;
    52 import java.util.stream.Collectors;
       
    53 import java.util.stream.Stream;
    53 
    54 
    54 /**
    55 /**
    55  * StandardBundlerParam
    56  * StandardBundlerParam
    56  *
    57  *
    57  * A parameter to a bundler.
    58  * A parameter to a bundler.
   671                 if (f.getName().equals("*")) {
   672                 if (f.getName().equals("*")) {
   672                     f = f.getParentFile();
   673                     f = f.getParentFile();
   673                 }
   674                 }
   674                 Set<File> theFiles = new HashSet<>();
   675                 Set<File> theFiles = new HashSet<>();
   675                 try {
   676                 try {
   676                     Files.walk(f.toPath())
   677                     try (Stream<Path> stream = Files.walk(f.toPath())) {
   677                             .filter(Files::isRegularFile)
   678                         stream.filter(Files::isRegularFile)
   678                             .forEach(p -> theFiles.add(p.toFile()));
   679                                 .forEach(p -> theFiles.add(p.toFile()));
       
   680                     }
   679                 } catch (IOException e) {
   681                 } catch (IOException e) {
   680                     e.printStackTrace();
   682                     e.printStackTrace();
   681                 }
   683                 }
   682                 result.add(new RelativeFileSet(f, theFiles));
   684                 result.add(new RelativeFileSet(f, theFiles));
   683             } else {
   685             } else {