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

ZipCentralDir.java references java.util.zip.ZipError #1385

Open
eirbjo opened this issue Aug 23, 2024 · 4 comments · Fixed by #1393
Open

ZipCentralDir.java references java.util.zip.ZipError #1385

eirbjo opened this issue Aug 23, 2024 · 4 comments · Fixed by #1393

Comments

@eirbjo
Copy link

eirbjo commented Aug 23, 2024

problem

The class java.util.zip.ZipError has been unused in OpenJDK since JDK 9. Efforts are underway to mark this class as deprecated with the intention to eventually remove it in a future release.

This deprecation issue is being tracked here: https://bugs.openjdk.org/browse/JDK-8336843

To help minimize ecosystem impact, I'm reaching out to SBT because we identified that the ZipCentralDir.java file throws ZipError.

If the deprecation suggestion is accepted by OpenJDK in a future release, then this reference will cause a compiler warning. In a later release, the removal of the class will cause a compilation error.

Looking at the SBT code, it seems it would be more appropriate to throw java.util.zip.ZipException in these cases.

This issue is mostly a heads-up. If you want to take action now and remove/rewrite the referencing code, that would be great. Otherwise, you might start seeing compiler warnings about the deprecation in a not-so-far future..

Thanks!

@eed3si9n
Copy link
Member

@eirbjo Thanks!

@eed3si9n
Copy link
Member

eed3si9n commented Sep 6, 2024

I have two PRs for 1.x and 2.x:

@eirbjo
Copy link
Author

eirbjo commented Oct 1, 2024

Thanks for takkng care of this @eed3si9n . I noticed that ZipCentralDir.java now has an unused import for java.util.zip.ZipError. This should probably be removed as well.

@eed3si9n eed3si9n reopened this Oct 1, 2024
@eed3si9n
Copy link
Member

eed3si9n commented Oct 1, 2024

Doh!

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 a pull request may close this issue.

2 participants