(jrtfs) Unnecessary null check in JrtPath.getAttributes

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 21
    • Affects Version/s: None
    • Component/s: tools
    • b05

      jdk.internal.jrtfs.JrtFileSystem#getFileAttributes never return 'null'. But in JrtPath.getAttributes its result is checked for null:

          final JrtFileAttributes getAttributes(LinkOption... options) throws IOException {
              JrtFileAttributes zfas = jrtfs.getFileAttributes(this, options);
              if (zfas == null) {
                  throw new NoSuchFileException(toString());
              }
              return zfas;
          }

      We can simplify and speed up code a bit.

            Assignee:
            Andrey Turbanov
            Reporter:
            Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: