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

sunlan 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 8d6dfba640 Trivial refactor: remove redundant type casting
8d6dfba640 is described below

commit 8d6dfba640c2b3d4b8398f18f455c01fbdd43442
Author: Daniel Sun <[email protected]>
AuthorDate: Mon Apr 13 01:52:43 2026 +0900

    Trivial refactor: remove redundant type casting
---
 .../groovy-sql/src/main/java/groovy/sql/GroovyRowResult.java        | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyRowResult.java 
b/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyRowResult.java
index 4aaa4d291f..ae0c20d648 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyRowResult.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyRowResult.java
@@ -66,10 +66,8 @@ public class GroovyRowResult extends GroovyObjectSupport 
implements Map<String,
         if (!(key instanceof CharSequence))
             return null;
         String keyStr = key.toString();
-        for (Object next : result.keySet()) {
-            if (!(next instanceof String))
-                continue;
-            if (keyStr.equalsIgnoreCase((String)next))
+        for (String next : result.keySet()) {
+            if (keyStr.equalsIgnoreCase(next))
                 return next;
         }
         return null;

Reply via email to