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 2018/04/03 23:51:57 UTC

groovy git commit: Trivial refactoring: simplify filling array

Repository: groovy
Updated Branches:
  refs/heads/master 30da8cf02 -> 5c9c72413


Trivial refactoring: simplify filling array


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/5c9c7241
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/5c9c7241
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/5c9c7241

Branch: refs/heads/master
Commit: 5c9c724131df853859f823e22693457a306587e9
Parents: 30da8cf
Author: sunlan <su...@apache.org>
Authored: Wed Apr 4 07:51:51 2018 +0800
Committer: sunlan <su...@apache.org>
Committed: Wed Apr 4 07:51:51 2018 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/5c9c7241/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index f7f182d..0776856 100644
--- a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -3193,7 +3193,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
 
                 if (asBoolean(emptyDimList)) {
                     empties = new Expression[emptyDimList.size()];
-                    Arrays.setAll(empties, i -> ConstantExpression.EMPTY_EXPRESSION);
+                    Arrays.fill(empties, ConstantExpression.EMPTY_EXPRESSION);
                 } else {
                     empties = Expression.EMPTY_ARRAY;
                 }