Initial webrev with changes for JDK 9 jrtfs

Xueming Shen xueming.shen at oracle.com
Mon Mar 14 23:08:28 UTC 2016


(1) JrtFilePath: it does not seem to help performance to use the byte[] as the
                  internal storage.

(2) AbstractJrtFilesystem.java

       getPathMatcher:
        ....
        if (syntax.equalsIgnoreCase(GLOB_SYNTAX)) {
             expr = JrtUtils.toRegexPattern(input);
         } else if (syntax.equalsIgnoreCase(REGEX_SYNTAX)) {
              expr = input;
         } else {
                 throw new UnsupportedOperationException("Syntax '" + syntax
                         + "' not recognized");
        }

(3) can't JrtFileSystem use sun.nio.fs.Globs ? instead of its own copy?

(4) JrtFilesystem.nodesToIterator()

     Stream has a "iterator() method. why need a collect() here? different performance?
     for example

       private Iterator<Path> nodesToIterator(AbstractJrtPath dir, List<Node> childNodes) {
         return childNodes.stream()
                          .map(child -> (Path)dir.resolve(toJrtPath(child.getNameString()).getFileName()))
                          .iterator();
       }


sherman




More information about the jigsaw-dev mailing list