< prev index next >
src/java.base/share/classes/java/security/Identity.java
Print this page
@@ -183,11 +183,11 @@
/* Should we throw an exception if this is already set? */
public void setPublicKey(PublicKey key) throws KeyManagementException {
check("setIdentityPublicKey");
this.publicKey = key;
- certificates = new Vector<Certificate>();
+ certificates = new Vector<>();
}
/**
* Specifies a general information string for this identity.
*
@@ -246,11 +246,11 @@
throws KeyManagementException {
check("addIdentityCertificate");
if (certificates == null) {
- certificates = new Vector<Certificate>();
+ certificates = new Vector<>();
}
if (publicKey != null) {
if (!keyEquals(publicKey, certificate.getPublicKey())) {
throw new KeyManagementException(
"public key different from cert public key");
< prev index next >