You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/11/16 15:33:39 UTC
(commons-jxpath) 04/05: Reuse StringUtils.isNotEmpty()
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jxpath.git
commit 10136c7e7646c8d5cb96a147087345919e59226d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 16 10:29:32 2025 -0500
Reuse StringUtils.isNotEmpty()
---
src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java b/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
index 00bd2612..92613fae 100644
--- a/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
+++ b/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
@@ -27,6 +27,7 @@ import java.nio.file.Paths;
import java.util.Properties;
import org.apache.commons.jxpath.util.ClassLoaderUtil;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.SystemProperties;
/**
@@ -109,7 +110,7 @@ public abstract class JXPathContextFactory {
}
try (BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"))) {
final String factory = rd.readLine();
- if (factory != null && !"".equals(factory)) {
+ if (StringUtils.isNotEmpty(factory)) {
if (debug) {
System.err.println("JXPath: loaded from services: " + factory);
}