On Wed, 14 May 2025 15:59:25 GMT, Anthony Scarpino <ascarp...@openjdk.org> 
wrote:

>> src/java.base/share/classes/java/security/PEMDecoder.java line 456:
>> 
>>> 454: 
>>> 455:     /**
>>> 456:      * Returns a copy of this {@code PEMDecoder} instance that uses
>> 
>> Why use "a copy"? Do you mean the password is kept?
>
> If this instance was configured with decryption, this method will return a 
> new instance configured with decryption and the factory provider.  I use "a 
> copy" so the user knows they are adding a new configuration and this instance 
> is staying the same

It's little confusing Returns a copy here, and @return a new PEMEncoder 
instance configured to the {@code Provider}.
Technically it's a new instance by any means ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2102421219

Reply via email to