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

[MSHADE-378] Shade plugin changes the compression level of nested jar… #73

Merged
merged 2 commits into from Nov 22, 2020

Conversation

jenrryyou
Copy link
Contributor

@jenrryyou jenrryyou commented Oct 7, 2020

Shade plugin loses the meta information of orignal jar entries when copying nested jar, which make these nested jar can't be loaded by JVM。This PR is trying to fix it by modified the copy logic for JarEntry.

The jira ticket link: https://issues.apache.org/jira/projects/MSHADE/issues/MSHADE-378?filter=allopenissues

@rmannibucau
Copy link
Contributor

Hi @jenrryyou ,

the PR looks good but is it possible to add a test about this case (thinking out loud DefaultShaderTest can be a base and required to generate a fake jar with nested jar using TemporaryFolder as base).

Impl side note: a PushbackInputStream can probably avoid a custom inputstream impl and still enable to test the zip header.

@jenrryyou
Copy link
Contributor Author

Hi @rmannibucau ,
thanks for your review and comment,I will add a test for this case. As for using PushbackInputStream, it seems like a better
idea and I will try it also.

@jenrryyou
Copy link
Contributor Author

Hi @rmannibucau ,
A test is added for this PR to verify that shade plugin wouldn't change the compression level of nested jar. By the way, ZipHeaderPeekInputStream is refined and based on PushbackInputStream now.

@jenrryyou
Copy link
Contributor Author

Hi @rmannibucau ,
Since I have no write access for this repo,I was wondering if you could merge this PR or somebody else would do?

@rmannibucau rmannibucau merged commit c798d01 into apache:master Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants