--- 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;