RFR: 8296612: CertAttrSet is useless

Sean Mullan mullan at openjdk.org
Thu Nov 10 20:28:54 UTC 2022


On Tue, 8 Nov 2022 22:42:05 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> - All `CertAttrSet` child classes now implement `DerEncoder`
> - `DerEncoder::derEncode` is renamed to `DerEncoder::encode`, and duplicate methods are removed
> - `s.s.x.Extension` now implements `DerEncoder`, so its child classes no need to implement it
> - `X509CertImpl::encode(OutputStream out)` removed, used nowhere

Looks good. Issue should probably have `noreg-cleanup` label.

src/java.base/share/classes/sun/security/pkcs/SignerInfo.java line 220:

> 218:      * @exception IOException on encoding error.
> 219:      */
> 220:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

src/java.base/share/classes/sun/security/pkcs10/PKCS10Attribute.java line 110:

> 108:      * @exception IOException on encoding errors.
> 109:      */
> 110:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

src/java.base/share/classes/sun/security/pkcs10/PKCS10Attributes.java line 97:

> 95:      * @exception IOException on encoding errors.
> 96:      */
> 97:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

src/java.base/share/classes/sun/security/util/DerEncoder.java line 43:

> 41:      * @param out  the stream on which the DER encoding is written.
> 42:      */
> 43:     void encode(DerOutputStream out)

Add `@Override`.

src/java.base/share/classes/sun/security/util/DerOutputStream.java line 585:

> 583:      *  @exception IOException on output error.
> 584:      */
> 585:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

src/java.base/share/classes/sun/security/x509/AVA.java line 628:

> 626:      * @exception IOException on encoding error.
> 627:      */
> 628:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

src/java.base/share/classes/sun/security/x509/X509CertImpl.java line 276:

> 274:      * @exception IOException on encoding error.
> 275:      */
> 276:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

test/langtools/tools/jdeps/jdkinternals/src/q/NoRepl.java line 31:

> 29: 
> 30: public class NoRepl implements DerEncoder {
> 31:     public void encode(DerOutputStream out) throws IOException {

Add `@Override`.

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

Marked as reviewed by mullan (Reviewer).

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



More information about the security-dev mailing list