Skip to content

Commit

Permalink
use isEmpty (NPE safe) instead of length check
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Mar 15, 2024
1 parent 997b74c commit 47d7dd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="5.4.5.22-SNAPSHOT"/>
<property name="version" value="5.4.5.23-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>5.4.5.22-SNAPSHOT</version>
<version>5.4.5.23-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit 47d7dd5

Please sign in to comment.