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

Avoid illegal reflective access on ZipEntry.xdostime #27100

Conversation

dreis2211
Copy link
Contributor

Hi,

this PR provides an alternative solution for the illegal reflective access on ZipEntry.xdostime inside JarFileTests.jarFileEntryWithEpochTimeOfZeroShouldNotFail and is part of the overall JDK 17 story at #26767.

As per comment from @AlanBateman I took another look and found that the JDK is testing things a bit differently for similar scenarios that doesn't require reflection or opening up modules. See ZeroDate.java

The idea is basically to change the necessary bytes in the actual file. Also not too pretty, I must say. But it's reflection free and doesn't access any internals anymore.

Let me know what you think.
Cheers,
Christoph

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 25, 2021
@philwebb philwebb added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 25, 2021
@philwebb philwebb added this to the 2.5.x milestone Jun 25, 2021
@wilkinsona
Copy link
Member

Thanks very much, @dreis2211.

@wilkinsona wilkinsona modified the milestones: 2.5.x, 2.5.3 Jul 8, 2021
@wilkinsona wilkinsona closed this in efcb8c5 Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants