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

Rename ZipEntry.extraAttributes to ZipEntry.externalFileAttributes

    XMLWordPrintable

Details

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

    Description

      The internal field 'ZipEntry.extraAttributes' was introduced in JDK-8218021, then under the name 'ZipEntry.posixPerms'. JDK-8250968 later renamed the field to 'ZipEntry.extraAttributes' and extended its semantics to hold the full value of the "external file attributes" field, as defined by APPNOTE.TXT.

      The name 'extraAttributes' is misleading. The two-byte field it holds refers to the 'external file attributes' field of the CEN header. It has nothing to do with the 'extra field', an unrelated structure defined in APPNOTE.TXT.

      To prevent confusion and make life easier for future maintainers, the field should be renamed to 'ZipEntry.externalFileAttributes'. Any derived local variable or method should be renamed accordingly.

      The field is not public, so renaming it does not change the API and should have no compatibility impact.

      A similar rename should also be done in zipfs

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: