jameschen1519 commented on a change in pull request #383:
URL: https://github.com/apache/knox/pull/383#discussion_r524277885



##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultKeystoreService.java
##########
@@ -513,12 +513,14 @@ private synchronized boolean isKeyStoreAvailable(final 
Path keyStoreFilePath, St
   // Package private for unit test access
   // We need this to be synchronized to prevent multiple threads from using at 
once
   synchronized KeyStore createKeyStore(Path keystoreFilePath, String 
keystoreType, char[] password) throws KeystoreServiceException {
-    if (Files.notExists(keystoreFilePath)) {
-      // Ensure the parent directory exists...
-      try {
+    // Ensure the parent directory exists...
+    // This is symlink safe.
+    Path parentPath = keystoreFilePath.getParent();

Review comment:
       Test has been added.




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


Reply via email to