On Tue, 13 May 2025 02:21:57 GMT, Anthony Scarpino <ascarp...@openjdk.org> 
wrote:

>> src/java.base/share/classes/java/security/PEMEncoder.java line 129:
>> 
>>> 127:      * Returns a new instance of {@code PEMEncoder}.
>>> 128:      *
>>> 129:      * @return new {@code PEMEncoder} instance
>> 
>> "new" sounds like it is a new instance each time this method is called. 
>> Suggest just saying "Returns a `PEMEncoder`"
>
> Ok

Still has the "new" word.

>> src/java.base/share/classes/java/security/PEMEncoder.java line 214:
>> 
>>> 212:      * @see #withEncryption(char[])
>>> 213:      */
>>> 214:     public byte[] encode(DEREncodable de) {
>> 
>> Is this method that useful? Caller can just do what line 215 is doing.
>
> I think it's user friendly to when writing to a byte[] or OutputStream.  
> Base64.Encoder has byte[], ByteBuffer, and String.

Ok.

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

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

Reply via email to