-
Notifications
You must be signed in to change notification settings - Fork 714
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
Use sun.misc.IOUtils new API readAllBytes() #8312
Conversation
Replace IOUtils.readFully(is, -1, true) with IOUtils.readAllBytes(is) to avoid "IOException: length cannot be negative: -1". [ci skip] because the new API is not available at extension repo openj9 branch. Signed-off-by: Jason Feng <fengj@ca.ibm.com>
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.
lgtm
Jenkins test sanity zlinux jdk8 |
@JasonFengJ9 Can you port the change to the 0.18 branch? |
FYI - I'm not sure the PR build will pass as it depends on the openjdk import |
This is due to the changes being a backport. I wouldn't worry about incorrect since tags in the upstream code |
Started testing with the openj9-staging branch here https://ci.eclipse.org/openj9/view/Pipelines/job/Pipeline-Release-Build/144/ |
@DanHeidinga created #8315 for 0.18 branch. |
This PR made change to https://github.com/eclipse/openj9/blob/master/jcl/src/java.base/share/classes/java/lang/invoke/SecurityFrameInjector.java |
@JasonFengJ9 Does this test need to be changed as well? https://github.com/eclipse/openj9/blob/2f295ea91cdd97ff37eb5d164fc63014ea718bc7/test/functional/Java8andUp/src/org/openj9/test/regression/Cmvc194280.java#L47 |
Note the extended test failures in https://ci.eclipse.org/openj9/job/Test_openjdk8_j9_extended.functional_s390x_linux_OpenJDK8/1/ |
This works as before because of the back compatibility implemented by |
This seems same error. |
This appears the initial build triggered by JDK8 Acceptance pipeline. @pshipton could you launch another |
Started extended.functional https://ci.eclipse.org/openj9/view/Pipelines/job/Pipeline-Release-Build/147/ |
Nm, I forgot this was specific to jdk8. |
Use sun.misc.IOUtils new API readAllBytes()
Replace
IOUtils.readFully(is, -1, true)
withIOUtils.readAllBytes(is)
to avoidIOException: length cannot be negative: -1
.[ci skip]
because the new APIreadAllBytes(is)
is not available at extension repoopenj9
branch.Notes:
readNBytes(is, Integer.MAX_VALUE)
has same result,readAllBytes(is)
seems better choice;sun.misc.IOUtils
specifies@since 1.9
or@since 11
though this is a dedicatedJava 8
extension rep https://github.com/ibmruntimes/openj9-openjdk-jdk8/blob/e6095d9adfe3c072d483a7df3fcdf1eeec76044b/jdk/src/share/classes/sun/misc/IOUtils.java#L284-L302@andrew-m-leonard any insights?
Reviewer: @DanHeidinga
Fixes #8308
Fixes #8309
Signed-off-by: Jason Feng fengj@ca.ibm.com