Skip to content

Commit 348888e

Browse files
committed
[refactor] remove commons-lang3 dependency from last extensions
The last two were the mail module and the LDAP security realm.
1 parent ef7a696 commit 348888e

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

extensions/modules/mail/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@
8989
<scope>runtime</scope>
9090
</dependency>
9191

92-
<dependency>
93-
<groupId>org.apache.commons</groupId>
94-
<artifactId>commons-lang3</artifactId>
95-
</dependency>
96-
9792
<dependency>
9893
<groupId>commons-codec</groupId>
9994
<artifactId>commons-codec</artifactId>

extensions/modules/mail/src/main/java/org/exist/xquery/modules/mail/MessageListFunctions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import jakarta.mail.search.SearchTerm;
4848
import jakarta.mail.search.SentDateTerm;
4949
import jakarta.mail.search.SubjectTerm;
50-
import org.apache.commons.lang3.StringUtils;
5150
import org.apache.logging.log4j.LogManager;
5251
import org.apache.logging.log4j.Logger;
5352
import org.exist.dom.QName;

extensions/security/ldap/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@
5757
<artifactId>log4j-api</artifactId>
5858
</dependency>
5959

60-
<dependency>
61-
<groupId>org.apache.commons</groupId>
62-
<artifactId>commons-lang3</artifactId>
63-
</dependency>
64-
6560
<dependency>
6661
<groupId>commons-io</groupId>
6762
<artifactId>commons-io</artifactId>

extensions/security/ldap/src/main/java/org/exist/security/realm/ldap/LdapContextFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import javax.naming.ldap.InitialLdapContext;
3030
import javax.naming.ldap.LdapContext;
3131

32-
import org.apache.commons.lang3.StringUtils;
3332
import org.apache.logging.log4j.LogManager;
3433
import org.apache.logging.log4j.Logger;
3534
import org.exist.config.Configurable;
@@ -101,7 +100,7 @@ public LdapContext getLdapContext(String username, final String password, final
101100
throw new IllegalStateException("An LDAP URL must be specified of the form ldap://<hostname>:<port>");
102101
}
103102

104-
if (StringUtils.isBlank(password)) {
103+
if (password == null || password.isBlank()) {
105104
throw new IllegalStateException("Password for LDAP authentication may not be empty.");
106105
}
107106

0 commit comments

Comments
 (0)