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

compatible low-level jdk #191

Closed
Moqu opened this issue May 26, 2020 · 4 comments
Closed

compatible low-level jdk #191

Moqu opened this issue May 26, 2020 · 4 comments

Comments

@Moqu
Copy link

Moqu commented May 26, 2020

In RemoveFilesFromZipTask.updateHeaders, Math.negateExact is jdk version 1.8, it is recommended to rewrite it, so that it can support low-level android calls

@Moqu Moqu changed the title compatible low-level kdj compatible low-level jdk May 26, 2020
@srikanth-lingala
Copy link
Owner

I am not an android expert, but there are tests to make sure that zip4j is compatible with Android. These tests run on different versions of Android SDK from 23 to 29, and the test are passing there. Do you mean this method in missing in a SDK version lower than 23?

@Moqu
Copy link
Author

Moqu commented May 27, 2020

yes!The SDK below version 23, removeFiles will crash, because the SDK below version 24 uses java jdk1.6, SDK 24 ~ 26 uses java jdk 1.7, SDK 26 above uses java jdk 1.8 ...

@srikanth-lingala
Copy link
Owner

This is a minor change, and the method call can be implemented directly in zip4j to avoid calling jdk's method, but I hope that there are no more such methods, it will be difficult to change all method calls if there are any more. I will make this change and include it in the next release.

@srikanth-lingala
Copy link
Owner

Fix included in v2.6.1 released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants