RFR: 8370688: java.util.jar.JarEntry.getCodeSigners() and getCertificates() should specify that they return a copy of the arrays [v3]

Sean Mullan mullan at openjdk.org
Fri Dec 5 13:51:29 UTC 2025


On Thu, 4 Dec 2025 21:28:30 GMT, Koushik Muthukrishnan Thirupattur <duke at openjdk.org> wrote:

>> The implementation of JarEntry.getCodeSigners() and getCertificates() both return a copy of the original array. However, the documentation of these 2 methods currently doesn't specify this.
>
> Koushik Muthukrishnan Thirupattur has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8370688: Addressed review comments-moved the sentence to return label

src/java.base/share/classes/java/util/jar/JarEntry.java line 118:

> 116:      *
> 117:      * @return the {@code Certificate} objects for this entry, or
> 118:      * {@code null} if none. If non-null, this method returns a new

I think you can remove the "this method" words as it is implied by being in the "@return".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28615#discussion_r2592754088


More information about the security-dev mailing list