< prev index next >

src/java.base/share/classes/sun/security/util/KeyStoreDelegator.java

Print this page

        

*** 194,205 **** throws IOException, NoSuchAlgorithmException, CertificateException { // A new keystore is always created in the primary keystore format if (stream == null) { try { ! keystore = primaryKeyStore.newInstance(); ! } catch (InstantiationException | IllegalAccessException e) { // can safely ignore } type = primaryType; --- 194,206 ---- throws IOException, NoSuchAlgorithmException, CertificateException { // A new keystore is always created in the primary keystore format if (stream == null) { try { ! @SuppressWarnings("deprecation") ! KeyStoreSpi tmp = primaryKeyStore.newInstance(); ! keystore = tmp; } catch (InstantiationException | IllegalAccessException e) { // can safely ignore } type = primaryType;
*** 212,222 **** // First try the primary keystore then try the secondary keystore InputStream bufferedStream = new BufferedInputStream(stream); bufferedStream.mark(Integer.MAX_VALUE); try { ! keystore = primaryKeyStore.newInstance(); type = primaryType; keystore.engineLoad(bufferedStream, password); } catch (Exception e) { --- 213,225 ---- // First try the primary keystore then try the secondary keystore InputStream bufferedStream = new BufferedInputStream(stream); bufferedStream.mark(Integer.MAX_VALUE); try { ! @SuppressWarnings("deprecation") ! KeyStoreSpi tmp = primaryKeyStore.newInstance(); ! keystore = tmp; type = primaryType; keystore.engineLoad(bufferedStream, password); } catch (Exception e) {
*** 230,240 **** // Ignore secondary keystore when no compatibility mode if (!compatModeEnabled) { throw e; } ! keystore = secondaryKeyStore.newInstance(); type = secondaryType; bufferedStream.reset(); keystore.engineLoad(bufferedStream, password); if (debug != null) { --- 233,245 ---- // Ignore secondary keystore when no compatibility mode if (!compatModeEnabled) { throw e; } ! @SuppressWarnings("deprecation") ! KeyStoreSpi tmp= secondaryKeyStore.newInstance(); ! keystore = tmp; type = secondaryType; bufferedStream.reset(); keystore.engineLoad(bufferedStream, password); if (debug != null) {
*** 282,292 **** public boolean engineProbe(InputStream stream) throws IOException { boolean result = false; try { ! keystore = primaryKeyStore.newInstance(); type = primaryType; result = keystore.engineProbe(stream); } catch (Exception e) { throw new IOException(e); --- 287,299 ---- public boolean engineProbe(InputStream stream) throws IOException { boolean result = false; try { ! @SuppressWarnings("deprecation") ! KeyStoreSpi tmp = primaryKeyStore.newInstance(); ! keystore = tmp; type = primaryType; result = keystore.engineProbe(stream); } catch (Exception e) { throw new IOException(e);
< prev index next >