RFR: 8327779: Remove deprecated internal field sun.security.x509.X509Key.key
Sean Mullan
mullan at openjdk.org
Thu Mar 28 15:44:32 UTC 2024
On Mon, 11 Mar 2024 09:58:42 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> Please review this cleanup PR which removes the protected, deprecated field `X509Key.key` in the internal package `sun.security.x509`.
>
> This field and the associated field `unusedBits` have been marked `@Deprecated` since the initial load. The recommended replacement is to use the `BitArray` representation, which does not require keys to be byte-aligned.
>
> Two use sites of the `key` field were found in subclasses:
>
> * The `ECPublicKeyImpl` constructor was updated to use a `BitArray` instead.
> * `ECPublicKeyImpl.parseKeyBits()` was updated to call `getKey().toByteArray()` to produce the byte array.
>
> Somewhat unrelated, the method `ECPublicKeyImpl.getEncodedPublicValue()` was deemed unused and has been removed.
>
> Testing and verification: This PR does not update any tests. GHA runs green.
This looks good to me - thanks for the cleanup.
-------------
Marked as reviewed by mullan (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18185#pullrequestreview-1966577694
More information about the security-dev
mailing list