RFR: 8377338: URLJarFile$URLJarFileEntry need not clone the arrays returned by getCertificates() and getCodeSigners() [v2]

Jaikiran Pai jpai at openjdk.org
Tue Feb 10 15:03:26 UTC 2026


> 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.

Jaikiran Pai has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - merge latest from master branch
 - remove unused imports
 - URLJarFile$URLJarFileEntry need not clone the arrays returned by getCertificates() and getCodeSigners()

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/29600/files
  - new: https://git.openjdk.org/jdk/pull/29600/files/27bd238a..2108bdd1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29600&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29600&range=00-01

  Stats: 6964 lines in 270 files changed: 3977 ins; 1664 del; 1323 mod
  Patch: https://git.openjdk.org/jdk/pull/29600.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29600/head:pull/29600

PR: https://git.openjdk.org/jdk/pull/29600


More information about the net-dev mailing list