RFR: 8360564: Implement JEP 524: PEM Encodings of Cryptographic Objects (Second Preview) [v12]

Anthony Scarpino ascarpino at openjdk.org
Fri Oct 31 21:51:11 UTC 2025


On Thu, 30 Oct 2025 20:18:33 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   minor doc updates, fix some bugs, PEM set to 26
>
> src/java.base/share/classes/java/security/PEMEncoder.java line 209:
> 
>> 207:                 byte[] encoding = null;
>> 208:                 if (key != null) {
>> 209:                     throw new IllegalArgumentException("Certificates " +
> 
> Typo. Not `Certificates`.

Bad cut-n-paste

> src/java.base/share/classes/sun/security/util/Pem.java line 195:
> 
>> 193:                     } else {
>> 194:                         while (hyphen > 0) {
>> 195:                             os.write('-');
> 
> The `-`s have already been written into `os` on line 202.

Yep.. this code is pretty useless.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27147#discussion_r2482759087
PR Review Comment: https://git.openjdk.org/jdk/pull/27147#discussion_r2482757468


More information about the security-dev mailing list