On Sun, 11 May 2025 19:02:55 GMT, Anthony Scarpino <ascarp...@openjdk.org> 
wrote:

>> Hi all,
>> 
>> I need a code review of the PEM API.  Privacy-Enhanced Mail (PEM) is a 
>> format for encoding and decoding cryptographic keys and certificates.  It 
>> will be integrated into JDK24 as a Preview Feature.  Preview features does 
>> not permanently define the API and it is subject to change in future 
>> releases until it is finalized.
>> 
>> Details about this change can be seen at [PEM API 
>> JEP](https://bugs.openjdk.org/browse/JDK-8300911).
>> 
>> Thanks
>> 
>> Tony
>
> Anthony Scarpino has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   comments on the 11th

src/java.base/share/classes/java/security/PEMRecord.java line 116:

> 114:      *
> 115:      * @param type the type identifier in the PEM header and footer, or 
> {@code null} if there is no PEM data.
> 116:      * @param pem The data between the PEM header and footer.

s/The/the/

src/java.base/share/classes/java/security/PEMRecord.java line 116:

> 114:      *
> 115:      * @param type the type identifier in the PEM header and footer, or 
> {@code null} if there is no PEM data.
> 116:      * @param pem The data between the PEM header and footer.

This should say "the base64-encoded data ..."

src/java.base/share/classes/java/security/PEMRecord.java line 129:

> 127:      *
> 128:      * @param type the type identifier in the PEM header and footer, or 
> {@code null} if there is no PEM data.
> 129:      * @param pem the data between the PEM header and footer.

I thought the bytes were the DER encoded data. Wouldn't that be useful, if you 
were trying to PEM encode a certificate with extra leading data, for example?

src/java.base/share/classes/java/security/PEMRecord.java line 142:

> 140:      *
> 141:      * @throws IllegalArgumentException if {@code pem} cannot be decoded.
> 142:      * @return Returns a new array of the binary encoding each time this

Remove "Returns".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2085418309
PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2085421719
PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2085423396
PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2085412731

Reply via email to