risdenk commented on a change in pull request #72: KNOX-1820 - Cleanup 
KeystoreService implementations and add unit tests
URL: https://github.com/apache/knox/pull/72#discussion_r265301035
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultKeystoreService.java
 ##########
 @@ -473,13 +482,113 @@ private KeyStore getKeystore(Path keystorePath, String 
keystoreType, String alia
 
     readLock.lock();
     try {
-      return getKeystore(keystoreFile, keystoreType, 
getKeystorePassword(alias));
+      return loadKeyStore(keystorePath, keystoreType, 
getKeyStorePassword(alias));
     } finally {
       readLock.unlock();
     }
   }
 
-  private char[] getKeystorePassword(String alias) throws 
KeystoreServiceException {
+  private boolean isKeyStoreAvailable(final Path keyStoreFilePath, String 
storeType, char[] password) throws KeyStoreException, IOException {
+    if (keyStoreFilePath.toFile().exists()) {
 
 Review comment:
   Can we operate on the Path directly? `Files.exists(keystorePath)`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to