From 47d7dd5d4a645f04d6f12c485aa3a1a656cc9e91 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Fri, 15 Mar 2024 14:47:34 +0100 Subject: [PATCH] use isEmpty (NPE safe) instead of length check --- core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java | 4 ++-- loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java b/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java index 15869c1f13..e1943a22e9 100755 --- a/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java +++ b/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java @@ -1700,8 +1700,8 @@ else if (access >= SecurityManager.VALUE_1 && access <= SecurityManager.VALUE_10 if (!StringUtil.isEmpty(id)) el.setAttribute("id", id); else if (el.hasAttribute("id")) el.removeAttribute("id"); - if (username.length() > 0) el.setAttribute("username", username); - if (password.length() > 0) el.setAttribute("password", ConfigWebUtil.encrypt(password)); + if (!StringUtil.isEmpty(username)) el.setAttribute("username", username); + if (!StringUtil.isEmpty(password)) el.setAttribute("password", ConfigWebUtil.encrypt(password)); el.setAttribute("host", host); if (!StringUtil.isEmpty(timezone)) el.setAttribute("timezone", timezone); diff --git a/loader/build.xml b/loader/build.xml index 083c4b969b..a0a86868c8 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index dfcc37668c..1f88008def 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 5.4.5.22-SNAPSHOT + 5.4.5.23-SNAPSHOT jar Lucee Loader Build