You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2024/06/16 17:13:37 UTC

(groovy) branch master updated: `CharSequence#isEmpty` is 15+

This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 43df77319a `CharSequence#isEmpty` is 15+
43df77319a is described below

commit 43df77319ad3b65a02aa0fd092ee642daa0abb23
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Sun Jun 16 12:15:07 2024 -0500

    `CharSequence#isEmpty` is 15+
---
 src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
index f05065f25f..c0113b2681 100644
--- a/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
@@ -3436,7 +3436,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * @see #isAllWhitespace(CharSequence)
      */
     public static boolean isBlank(final CharSequence self) {
-        return self == null || self.isEmpty() || self.toString().isBlank();
+        return self == null || self.length() == 0 || self.toString().isBlank();
     }
 
     /**