-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8321274: Rename ZipEntry.extraAttributes to ZipEntry.externalFileAttributes #16952
Conversation
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
/issue 8321274 |
@eirbjo This issue is referenced in the PR title - it will now be updated. |
Webrevs
|
Thank you for the contribution Eirik. I will take a peek at this once we are able to push changes for JDK 23 |
@eirbjo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@eirbjo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
Hello Eirik, I think this is a reasonable change. I haven't had a chance to review some of these PRs due to some other priority tasks. I have these PRs on my TODO list. So if you want to pursue this further, please go ahead and reopen this and I'll review this in the coming days. |
/open |
@eirbjo This pull request is now open |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change is OK, any reason to not make it externalFileAttributes
?
@eirbjo This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 18 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
None other than length / verbosity. But since this refers to the attributes of the external file, dropping any name element also loses some semantics, introducing a potential for confusion. Perhaps verbosity is the sensible choice here. If you agree to the above, I can update the PR to rename to the following names instead:
WDYT? |
I think the proposed change above makes things clearer. Perhaps also make the same change in zipfs as well while you are at it? |
I have pushed the rename to "ZipEntry.externalFileAttributes". Also renamed A side note: The Posix support in |
/label add nio |
This PR was approved by Lance in March, but it seems I forgot to integrate. I plan to integrate this in the next few days unless I hear objections. |
Hello Eirik, it will be better to merge with the latest master branch and run the tier tests before integrating. |
I believe this field only captures the 2 bytes at higher indices of External File Attribute; it's not the complete 4-byte external file attributes and this value is not captured unless "Version made by" field's larger index byte (byte 5) is 3. So this name may still be imperfect. |
The purpose of this PR was mainly to reduce the risk of confusion with the "extra field", which is an entirely unrelated concept. While I agree that the name Instead of trying to find a name which covers the full semantics, I suggest that we keep
Since I don't want to delay the integration of the this PR any further, I suggest we tackle the above clarifications in a follow-up PR. Would that be ok with you, @liach ? |
Life happened, but I have now merged with the latest master and GHA runs green. Did you want to run additional testing before integration @jaikiran ? |
Hello Eirik, I'll run some tests and review this PR this coming week. |
Hello Eirik, the latest changes in this PR ( Can you issue a |
/integrate delegate |
@eirbjo Integration of this pull request has been delegated and may be completed by any project committer using the /integrate pull request command. |
Done. And big thanks for your help getting this long-lasting change across the finish line! |
/integrate |
Going to push as commit d51141e.
Your commit was automatically rebased without conflicts. |
Please consider this PR which suggests we rename
ZipEntry.extraAttributes
toZipEntry.externalFileAttributes
.This field was introduced in JDK-8218021, originally under the name
ZipEntry.posixPerms
. JDK-8250968 later renamed the field toZipEntry.extraAttributes
and extended its semantics to hold the full two-byte value of theexternal file attributes
field, as defined byAPPNOTE.TXT
The name
extraAttributes
is misleading. It has nothing to do with theextra field
(an unrelated structure defined inAPPNOTE.TXT
), although the name indicates it does.To prevent confusion and make life easier for future maintainers, I suggest we rename this field to
ZipEntry.externalFileAttributes
and update related methods, parameters and comments accordingly.While this change is a straightforward renaming, reviewers should consider whether it carries its weight, especially considering it might complicate future backports.
As a note to reviewers, this PR includes the following intended updates:
ZipEntry.extraAttributes
and any references to this field toZipEntry.externalFileAttributes
JavaUtilZipFileAccess
to similarly rename methods tosetExternalFileAttributes
andgetExternalFileAttributes
JarSigner.extraAttrsDetected
toJarSigner.externalFileAttrsDetected
JarSigner.writeEntry
toexternalFileAttributes
s.s.t.jarsigner.Main.extraAttrsDetected
toexternalFileAttributesDetected
s.s.t.jarsigner.Resources
fromextra.attributes.detected
toexternal.file.attributes.detected
SymlinkTest.verifyExtraAttrs
toverifyExternalFileAttributes
, also updated two references to 'extra attributes' in this methodIf the resource file changes should be dropped and instead handled via
msgdop
updates, let me know and I can revert the non-default files.I did a search across the code base to find 'extraAttrs', 'extra.attr' after these updates, and found nothing related to zip/jar. The
zip
andjar
tests run clean:Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16952/head:pull/16952
$ git checkout pull/16952
Update a local copy of the PR:
$ git checkout pull/16952
$ git pull https://git.openjdk.org/jdk.git pull/16952/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16952
View PR using the GUI difftool:
$ git pr show -t 16952
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16952.diff
Webrev
Link to Webrev Comment