diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 3185770c8..8973b86f0 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -4614,7 +4614,7 @@ public class StringUtils {
* @return String length or 0
if the String is null
.
* @since 2.4
*/
- public static int length(String str) {
+ public static int length(CharSequence str) {
return str == null ? 0 : str.length();
}