8217820: Useless cast in ECUtil.java
authorxuelei
Fri, 25 Jan 2019 18:43:02 -0800
changeset 53514 bad8cc20a9bf
parent 53513 8c035b34248d
child 53515 a772e65727c5
8217820: Useless cast in ECUtil.java Reviewed-by: jnimeh
src/java.base/share/classes/sun/security/util/ECUtil.java
--- 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();
     }