On Mon, 4 May 2026 17:13:45 GMT, Anthony Scarpino <[email protected]> wrote:

>> Please review the finalized PEM API at https://openjdk.org/jeps/8376991. The 
>> most significant changes from the second preview, JEP 524 
>> (https://openjdk.org/jeps/524), include:
>> 
>> - The `PEM` class is now an ordinary class rather than a record. It adds 
>> Binary-encoded content constructors and data is defensively copied.
>> - The `DEREncodable` interface is renamed to `BinaryEncodable` to more 
>> accurately reflect the binary data stored in PEM text.
>> - In `EncryptedPrivateKeyInfo`, the `encrypt` methods now accept 
>> `BinaryEncodable`, and the `getKey()` and `getKeyPair()` methods no longer 
>> include a `Provider` parameter.
>> - A new `CryptoException` class indicates failures in cryptographic 
>> processing at runtime.
>> 
>> thanks
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Anthony Scarpino has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   comments and new clear()

src/java.base/share/classes/java/security/BinaryEncodable.java line 39:

> 37:  *
> 38:  * This sealed interface may evolve. When using {@code switch}, always 
> include a
> 39:  * {@code default} case rather than relying on this permits list to remain

suggest rewording as "... relying on the classes specified in the `permits` 
clause to remain fixed."

src/java.base/share/classes/javax/crypto/CryptoException.java line 47:

> 45: 
> 46:     /**
> 47:      * Constructs a new CryptoException with {@code null} as its detail 
> message.

Put CryptoException in code font. Same comment throughout rest of class.

test/jdk/java/security/PEM/PEMData.java line 718:

> 716:         for (int i = 0; i < len; i++) {
> 717:             if (a.charAt(i) != b.charAt(i)) {
> 718:                 throw new AssertionError("Char mistmatch, index #" + i +

s/mistmatch/mismatch/

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3189919063
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3190400826
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3190363977

Reply via email to