Skip to content

CachingArchive.java and NexusRepositoryIndexerImpl.java references the java.util.zip.ZipError class #7818

@eirbjo

Description

@eirbjo

Apache NetBeans version

Apache NetBeans latest daily build

What happened

This is a Netbeans source code issue unrelated to the use of the product.

Language / Project Type / NetBeans Component

This is a Netbeans source code issue

How to reproduce

See the source code for the mentioned classes referencing java.util.zip.ZipError

Did this work correctly in an earlier version?

No / Don't know

Operating System

This is a build / source code issue

JDK

This is a build / source code issue

Apache NetBeans packaging

Other

Anything else

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 maybe 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 Apache Netbeans because we identified that the following source code files reference java.util.zip.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 may cause a compilation error.

Looking at the Netbeans code, it seems it would be more appropriate to catch java.lang.InternalError in these two cases, that's the super class of ZipError.

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!

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)Maven[ci] enable "build tools" testsUpgrade JDKUpgrade to the JDK requirements of a module.kind:bugBug report or fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions