Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289431

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P5
    • 20
    • None
    • core-libs
    • b05

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: