changeset 54615:bad8cc20a9bf

8217820: Useless cast in ECUtil.java Reviewed-by: jnimeh
author xuelei
date Fri, 25 Jan 2019 18:43:02 -0800
parents 8c035b34248d
children a772e65727c5
files src/java.base/share/classes/sun/security/util/ECUtil.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/util/ECUtil.java	Sat Jan 26 10:34:29 2019 +0900
+++ b/src/java.base/share/classes/sun/security/util/ECUtil.java	Fri Jan 25 18:43:02 2019 -0800
@@ -31,7 +31,6 @@
 import java.security.interfaces.*;
 import java.security.spec.*;
 import java.util.Arrays;
-import sun.security.x509.X509Key;
 
 public class ECUtil {
 
@@ -103,7 +102,7 @@
             ECParameterSpec params) throws InvalidKeySpecException {
         KeyFactory keyFactory = getKeyFactory();
         ECPublicKeySpec keySpec = new ECPublicKeySpec(w, params);
-        X509Key key = (X509Key)keyFactory.generatePublic(keySpec);
+        Key key = keyFactory.generatePublic(keySpec);
 
         return key.getEncoded();
     }