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

ZipEntry.flag could be made internal to ZipOutputStream

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs

      The field ZipEntry.flags has no meaningful use outside ZipInputStream and could be moved to an internal field in ZipInputStream.XEntry. This saves four bytes from the ZipEntry object size and also a read in ZipFile.getZipEntry.

      History:

      In 2009, JDK-5030283 moved the "flags" field from ZipOutputStream.XEntry to ZipEntry. The change implemented support for non-UTF-8 charsets when reading ZIP entry names and comments. It's unclear why the field move was deemed neccessary.

            eirbjo Eirik Bjørsnøs
            eirbjo Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: