diff --git a/src/main/java/org/apache/commons/lang3/text/StrMatcher.java b/src/main/java/org/apache/commons/lang3/text/StrMatcher.java index bada208f4..b29d4fcf4 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrMatcher.java +++ b/src/main/java/org/apache/commons/lang3/text/StrMatcher.java @@ -19,6 +19,7 @@ package org.apache.commons.lang3.text; import java.util.Arrays; import org.apache.commons.lang3.ArraySorter; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; /** @@ -174,7 +175,7 @@ public abstract class StrMatcher { * @return a new matcher for the given char[] */ public static StrMatcher charSetMatcher(final char... chars) { - if (chars == null || chars.length == 0) { + if (ArrayUtils.isEmpty(chars)) { return NONE_MATCHER; } if (chars.length == 1) {