Skip to content

Commit

Permalink
[ZEPPELIN-6022] Skip decryption of credentials.json when file is empty (
Browse files Browse the repository at this point in the history
#4765)

* Skip decryption when empty

* Use more elegant empty json string check
  • Loading branch information
zeotuan authored and Reamer committed Jun 6, 2024
1 parent 488a851 commit 310bdc3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private void loadCredentials() throws IOException {
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);
}

Expand Down

0 comments on commit 310bdc3

Please sign in to comment.