You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/06/23 14:29:05 UTC

[groovy] branch master updated: Trivial refactoring: remove redundant type casting

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 0fffd2c  Trivial refactoring: remove redundant type casting
0fffd2c is described below

commit 0fffd2ccb95fceaf0fb4c3524212c8d1b2674d5e
Author: Daniel Sun <su...@apache.org>
AuthorDate: Wed Jun 23 22:28:29 2021 +0800

    Trivial refactoring: remove redundant type casting
---
 src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
index 9a23d8d..76e2cff 100644
--- a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -1596,9 +1596,7 @@ public class AsmClassGenerator extends ClassGenerator {
         mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
 
         int i = 0;
-        for (Object object : entries) {
-            MapEntryExpression entry = (MapEntryExpression) object;
-
+        for (MapEntryExpression entry : entries) {
             mv.visitInsn(DUP);
             BytecodeHelper.pushConstant(mv, i++);
             entry.getKeyExpression().visit(this);