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_r265647883
##########
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:
Saw you pushed a commit addressing `File` but didn't touch this file.
Assuming you were waiting on my feedback on the try/catch below.
----------------------------------------------------------------
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