On Thu, 14 May 2026 22:17:54 GMT, Anthony Scarpino <[email protected]> 
wrote:

>> src/java.base/share/classes/java/security/PEM.java line 202:
>> 
>>> 200:      * {@link Base64#getMimeDecoder()}.
>>> 201:      *
>>> 202:      * @return the Base64-decoded content
>> 
>> Suggestion: return a copy of...
>
> I had someone else recommend removing "copy of", since this is the decoded 
> content from getMimeDecoder().

This is an implementation detail. The content stored inside the object could be 
either Base64-encoded or Base64-decoded.

>> src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 
>> 379:
>> 
>>> 377:         Objects.requireNonNull(password, "a password must be 
>>> specified");
>>> 378:         Objects.requireNonNull(algorithm, "an algorithm must be 
>>> specified");
>>> 379:         char[] passwd = password.clone();
>> 
>> Why clone here?
>
> In the past some reviewers want clones in case the user-passed array changes 
> before it's used soon in the method.  If you think this caution is not needed 
> that's fine with me.

That's OK.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3248037089
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3248038285

Reply via email to