-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b05
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
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
- relates to
-
JDK-8250968 Symlinks attributes not preserved when using jarsigner on zip files
- Resolved
-
JDK-8218021 Have jarsigner preserve posix permission attributes
- Resolved
-
JDK-8335795 Clarify comments related to ZipEntry.externalFileAttributes
- New