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

Fix up hashCode() for ZipFile.Source.Key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 22
    • 17, 21, 22
    • core-libs
    • b21
    • Verified

      ZipFile.Source.Key constructor takes file argument passed from ZipFile constructor. Since ZipFile.Source.Key is used as key in HashMap lookups, the file should be stored with an absolute path value.

      see ZipFile:
                  synchronized (files) {
                      src = files.get(key);
                      if (src != null) {
                          src.refs++;
                          return src;
                      }
                  }
                  src = new Source(key, toDelete, zc);

            coffeys Sean Coffey
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: