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.

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

Commit messages:
 - Remove the deprecated field X509Key.key with associated code

Changes: https://git.openjdk.org/jdk/pull/18185/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18185&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8327779
  Stats: 55 lines in 2 files changed: 2 ins; 48 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/18185.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18185/head:pull/18185

PR: https://git.openjdk.org/jdk/pull/18185

Reply via email to