This is an automated email from the ASF dual-hosted git repository.

pdallig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new abc4182ed3 [ZEPPELIN-6022] Skip decryption of credentials.json when 
file is empty (#4765)
abc4182ed3 is described below

commit abc4182ed3bb2927fa0a63cebdc6a3405a9d033c
Author: zeotuan <48720253+zeot...@users.noreply.github.com>
AuthorDate: Thu Jun 6 21:59:15 2024 +1000

    [ZEPPELIN-6022] Skip decryption of credentials.json when file is empty 
(#4765)
    
    * Skip decryption when empty
    
    * Use more elegant empty json string check
---
 .../src/main/java/org/apache/zeppelin/user/Credentials.java             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
index f71fa43c00..f4e966382e 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
@@ -139,7 +139,7 @@ public class Credentials {
   private void loadFromFile() throws IOException {
     try {
       String json = storage.loadCredentials();
-      if (json != null && encryptor != null) {
+      if (encryptor != null && StringUtils.isNotBlank(json)) {
         json = encryptor.decrypt(json);
       }
 

Reply via email to