(zipfs) Avoid redundant HashMap.get in ZipFileSystemProvider.removeFileSystem

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 20
    • Affects Version/s: None
    • Component/s: core-libs
    • b05

      In the method jdk.nio.zipfs.ZipFileSystemProvider#removeFileSystem:

                  if (filesystems.get(zfpath) == zfs)
                      filesystems.remove(zfpath);

      Instead of separate HashMap.get/remove calls we can just use single HashMap.remove(key, value) call.
      It results in cleaner and a bit faster code.

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

              Created:
              Updated:
              Resolved: