On Thu, 1 Sep 2022 23:55:03 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java line >> 75: >> >>> 73: * field is returned in its string format as a series of nonnegative >>> 74: * integers separated by periods (For example, "1.3.14.7.2.1.1"). >>> 75: * If the encoded key cannot be parsed correctly, the algorithm is >>> {@code null}. >> >> Should these be under @implNote? Same question for the X509EncodedKeySpec >> also. > > I want this to be spec from now on. If we want to backport this to older > releases, then the paragraph above can be @implNote. I agree that this should be in the API spec. Does the „return null“ case for invalid encodings need to mention any exceptions triggered by the actual key instantion to make clear the Spec is only a container? ------------- PR: https://git.openjdk.org/jdk/pull/10131