-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8326100: DeflaterDictionaryTests should use Deflater.getBytesWritten instead of Deflater.getTotalOut #17901
Conversation
…d of Deflater.getTotalOut
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
The hazard when the format specifiers are all %s.
@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 187 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 |
Thanks for your review Alan!
Not sure I understand your comment since all arguments are of the same type (int) anyhow, I guess they would still be easy to get wrong or in the wrong order. Was that the hazard you refer to? Anyhow, I went ahead and replaced the %s specifiers with the more specific decimal integer specifier %d. I verified that the output remains identical. WDYT? |
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.
The changes look good to me.
Yes, it's easy to get a silent mismatch. In this case, the first message printed by testByteArray, the second parameter should have been the Adler but it was actually printing the number of bytes written. You've fixed it, and switched to %d, so all good. |
/integrate |
Going to push as commit 9451677.
Your commit was automatically rebased without conflicts. |
Please review this test-only cleanup PR in preparation for deprecating
Deflater.getTotalOut()
in JDK-8326096.This PR replaces various calls in
test/jdk/java/util/zip/DeflaterDictionaryTests.java
toDeflater.getTotalOut()
with calls toDeflater.getBytesWritten()
when formatting some debugging output lines.Additionally, various debug output lines claim to print the result of calling
Deflater.getAdler
, but instead prints the output of `Deflater.getTotalOut'. This PR fixes this to print the actual Adler value instead.Testing and verification: This is a test-only fix affecting only debug output. I have added the
noreg-self
label to the issue.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17901/head:pull/17901
$ git checkout pull/17901
Update a local copy of the PR:
$ git checkout pull/17901
$ git pull https://git.openjdk.org/jdk.git pull/17901/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17901
View PR using the GUI difftool:
$ git pr show -t 17901
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17901.diff
Webrev
Link to Webrev Comment