zjffdu commented on a change in pull request #3718: [ZEPPELIN-4727] Fix HDFS 
Credentials storage 
URL: https://github.com/apache/zeppelin/pull/3718#discussion_r405349621
 
 

 ##########
 File path: 
zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
 ##########
 @@ -80,7 +73,22 @@ public Credentials(Boolean credentialsPersist, String 
credentialsPath, String en
     }
   }
 
+  /**
+   * Wrapper for inmemory user credentials.
+   *
+   * @param conf
+   * @throws IOException
+   */
+  public Credentials() {
+    credentialsMap = new HashMap<>();
+    credentialsPersist = false;
+    encryptor = null;
+    storage = null;
+    gson = null;
+  }
+
   public UserCredentials getUserCredentials(String username) {
+    loadCredentials();
 
 Review comment:
   Doesn't `loadCredentials` throw IOException ? I don't see how it is handled 
here ?

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