Skip to content
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

JDK8: Backport 8240226 from JDK17 to fix DeflateIn_InflateOut.skipBytes #609

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

r30shah
Copy link
Contributor

@r30shah r30shah commented Sep 20, 2022

java/util/zip/DeflateIn_InflateOut.skipBytes verifies functionality of DeflaterInputStream.skipBytes. While testing skipping of bytes, test uses different input data with same data length, and compares the compressed sizes of these data to verify skipping bytes. As per zlib specification which is what is used by Deflater in java, length of compressed data is highly dependable on input data contents, so it will be incorrect to assume that compression ratio would be constant for same length input data. For more details please see explaination in eclipse-openj9/openj9#14948 (comment).

Signed-off-by: Rahil Shah rahil@ca.ibm.com

@r30shah
Copy link
Contributor Author

r30shah commented Sep 20, 2022

Porting the JDK test fix from ibmruntimes/openj9-openjdk-jdk11#559

@pshipton
Copy link
Member

I see the copyright check is failing. We need to add an IBM copyright statement after the Oracle copyright/license. I guess we missed that for jdk11 so it should be updated as well.

/*
 * ===========================================================================
 * (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
 * ===========================================================================
 */

@pshipton
Copy link
Member

pshipton commented Sep 20, 2022

Test passed in a grinder on rhel9s390xrt-1

@pshipton
Copy link
Member

pshipton commented Sep 20, 2022

As per ibmruntimes/openj9-openjdk-jdk11#559 (comment) I believe the plan is now to backport the test fix from jdk17. Setting this as draft until it's updated or closed.

@pshipton pshipton marked this pull request as draft September 20, 2022 17:17
@r30shah r30shah changed the title JDK8: Fix java/util/zip/DeflateIn_InflateOut.skipBytes Test JDK8: Backport 8240226 from JDK17 to fix DeflateIn_InflateOut.skipBytes Sep 21, 2022
@r30shah r30shah marked this pull request as ready for review September 21, 2022 14:07
@r30shah
Copy link
Contributor Author

r30shah commented Sep 21, 2022

@pshipton I have backported JDK17 fix to JDK8 and also changed the title of the PR. As this change was ported from JDK17, did not update the Copyright. Let me know if we need to change it.

@pshipton
Copy link
Member

pshipton commented Sep 21, 2022

Still passing a grinder on rhel9s390xrt-1. lgtm

@pshipton pshipton merged commit a7b0cf7 into ibmruntimes:openj9 Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants