Skip to content

Commit 10136c7

Browse files
committed
Reuse StringUtils.isNotEmpty()
1 parent dc1fdad commit 10136c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.Properties;
2828

2929
import org.apache.commons.jxpath.util.ClassLoaderUtil;
30+
import org.apache.commons.lang3.StringUtils;
3031
import org.apache.commons.lang3.SystemProperties;
3132

3233
/**
@@ -109,7 +110,7 @@ private static String findFactory(final String property, final String defaultFac
109110
}
110111
try (BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"))) {
111112
final String factory = rd.readLine();
112-
if (factory != null && !"".equals(factory)) {
113+
if (StringUtils.isNotEmpty(factory)) {
113114
if (debug) {
114115
System.err.println("JXPath: loaded from services: " + factory);
115116
}

0 commit comments

Comments
 (0)