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

ZipFile.getComment() should also check EFS bit like getInputStream() and getZipEntry() do.

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      ZipFile.getComment() should also check EFS bit like getInputStream() and getZipEntry() do.
      While the current implementaion does NOT check this.

      ================
       /**
           * Returns the zip file comment, or null if none.
           *
           * @return the comment string for the zip file, or null if none
           *
           * @throws IllegalStateException if the zip file has been closed
           *
           * Since 1.7
           */
          public String getComment() {
              synchronized (this) {
                  ensureOpen();
                  byte[] bcomm = getCommentBytes(jzfile);
                  if (bcomm == null)
                      return null;
                  return zc.toString(bcomm, bcomm.length);
              }
          }
      =====================

        Attachments

          Activity

            People

            Assignee:
            sherman Xueming Shen
            Reporter:
            stephenh Stephen Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: