On Fri, 22 May 2026 03:05:58 GMT, Krushna948 <[email protected]> wrote:
>> Anthony Scarpino has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> comments
>
> src/java.base/share/classes/java/security/PEM.java line 92:
>
>> 90: * This array is defensively copied.
>> 91: *
>> 92: * @throws IllegalArgumentException if {@code type} contains PEM
>
> Constructors currently say “type … must not contain PEM encapsulation syntax”
> and “Throws IllegalArgumentException if type contains PEM encapsulation
> syntax.”
> However, the implementation only rejects types that start with "-", "BEGIN "
> or "END ".
> Could you please clarify what the intended contract is?
> Should a type be rejected only if it starts with these prefixes, or
> Should it be rejected if it contains PEM encapsulation syntax anywhere in the
> string (e.g., "FOO -----BEGIN PUBLIC KEY----- BAR")?
The `type` is defined in more detail in the second paragraph in the class
description.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3292338539