jdk/src/java.base/share/classes/sun/security/pkcs/PKCS8Key.java
changeset 37782 ad8fe7507ecc
parent 34687 d302ed125dc9
child 45986 b9015c99d2dd
--- a/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS8Key.java	Tue May 03 15:50:54 2016 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS8Key.java	Tue May 03 10:40:54 2016 -0700
@@ -218,11 +218,10 @@
                 }
             }
 
-            Object      inst = null;
+            @SuppressWarnings("deprecation")
+            Object      inst = (keyClass != null) ? keyClass.newInstance() : null;
             PKCS8Key    result;
 
-            if (keyClass != null)
-                inst = keyClass.newInstance();
             if (inst instanceof PKCS8Key) {
                 result = (PKCS8Key) inst;
                 result.algid = algid;