RFR: 8377338: URLJarFile$URLJarFileEntry need not clone the arrays returned by getCertificates() and getCodeSigners()
Sean Mullan
mullan at openjdk.org
Tue Feb 10 13:36:08 UTC 2026
On Fri, 6 Feb 2026 10:02:23 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Can I please get a review of this change which removes the overriden `getCertificates()` and `getCodeSigners()` method implementations in `URLJarFile$URLJarFileEntry`?
>
> These overriden implementations were returning a cloned array, but as noted in https://bugs.openjdk.org/browse/JDK-8377338, these overrides are not needed because the corresponding methods in the `JarEntry` super class already return a cloned array.
>
> Existing tests in tier1, tier2 and tier3 continue to pass with this change.
src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java line 1:
> 1: /*
You can also remove the imports of `Certificate` and`CodeSigner`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29600#discussion_r2787994073
More information about the net-dev
mailing list