mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8296142: CertAttrSet::(getName|getElements|delete) are mostly useless
Reviewed-by: mullan
This commit is contained in:
parent
6626a29a74
commit
16a041a67a
41 changed files with 60 additions and 1162 deletions
|
@ -27,7 +27,6 @@ package sun.security.x509;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.security.cert.CRLReason;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import sun.security.util.*;
|
||||
|
||||
|
@ -131,18 +130,6 @@ public class CRLReasonCodeExtension extends Extension
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the attribute value.
|
||||
*/
|
||||
public void delete(String name) throws IOException {
|
||||
if (name.equalsIgnoreCase(REASON)) {
|
||||
reasonCode = 0;
|
||||
} else {
|
||||
throw new IOException
|
||||
("Name not supported by CRLReasonCodeExtension");
|
||||
}
|
||||
encodeThis();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a printable representation of the Reason code.
|
||||
|
@ -167,20 +154,11 @@ public class CRLReasonCodeExtension extends Extension
|
|||
super.encode(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an enumeration of names of attributes existing within this
|
||||
* attribute.
|
||||
*/
|
||||
public Enumeration<String> getElements() {
|
||||
AttributeNameEnumeration elements = new AttributeNameEnumeration();
|
||||
elements.addElement(REASON);
|
||||
|
||||
return elements.elements();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of this attribute.
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue