@Override public void flush() throws IOException { writeLock.lock(); try { if (!changed) { LOG.debug("Keystore hasn't changed, returning."); return; } LOG.debug("Writing out keystore."); try (OutputStream out = getOutputStreamForKeystore()) { keyStore.store(out, password); } catch (KeyStoreException e) { throw new IOException("Can't store keystore " + this, e); } catch (NoSuchAlgorithmException e) { throw new IOException("No such algorithm storing keystore " + this, e); } catch (CertificateException e) { throw new IOException("Certificate exception storing keystore " + this, e); } changed = false; } finally { writeLock.unlock(); } }
@Override public void flush() throws IOException { writeLock.lock(); try { if (!changed) { return; } // write out the keystore try (OutputStream out = getOutputStreamForKeystore()) { keyStore.store(out, password); } catch (KeyStoreException e) { throw new IOException("Can't store keystore " + this, e); } catch (NoSuchAlgorithmException e) { throw new IOException("No such algorithm storing keystore " + this, e); } catch (CertificateException e) { throw new IOException("Certificate exception storing keystore " + this, e); } changed = false; } finally { writeLock.unlock(); } }
@Override public void flush() throws IOException { writeLock.lock(); try { if (!changed) { return; } // write out the keystore try (OutputStream out = getOutputStreamForKeystore()) { keyStore.store(out, password); } catch (KeyStoreException e) { throw new IOException("Can't store keystore " + this, e); } catch (NoSuchAlgorithmException e) { throw new IOException("No such algorithm storing keystore " + this, e); } catch (CertificateException e) { throw new IOException("Certificate exception storing keystore " + this, e); } changed = false; } finally { writeLock.unlock(); } }
@Override public void flush() throws IOException { writeLock.lock(); try { if (!changed) { return; } // write out the keystore try (OutputStream out = getOutputStreamForKeystore()) { keyStore.store(out, password); } catch (KeyStoreException e) { throw new IOException("Can't store keystore " + this, e); } catch (NoSuchAlgorithmException e) { throw new IOException("No such algorithm storing keystore " + this, e); } catch (CertificateException e) { throw new IOException("Certificate exception storing keystore " + this, e); } changed = false; } finally { writeLock.unlock(); } }
@Override public void flush() throws IOException { writeLock.lock(); try { if (!changed) { LOG.debug("Keystore hasn't changed, returning."); return; } LOG.debug("Writing out keystore."); try (OutputStream out = getOutputStreamForKeystore()) { keyStore.store(out, password); } catch (KeyStoreException e) { throw new IOException("Can't store keystore " + this, e); } catch (NoSuchAlgorithmException e) { throw new IOException("No such algorithm storing keystore " + this, e); } catch (CertificateException e) { throw new IOException("Certificate exception storing keystore " + this, e); } changed = false; } finally { writeLock.unlock(); } }