groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Minor refactoring
Date Thu, 24 Aug 2017 23:54:46 GMT
Repository: groovy
Updated Branches:
  refs/heads/master cf583ac5d -> 341b53d58


Minor refactoring


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

Branch: refs/heads/master
Commit: 341b53d58241b028d2559edc81db012ebb9a2eb9
Parents: cf583ac
Author: sunlan <sunlan@apache.org>
Authored: Fri Aug 25 07:54:40 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Fri Aug 25 07:54:40 2017 +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/341b53d5/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 0b13c5b..f42cdf5 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
@@ -3246,7 +3246,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object>
implements Groov
                     if (expression instanceof ClosureExpression && !asBoolean(e.closure().ARROW()))
{
                         List<Statement> statementList = ((BlockStatement) ((ClosureExpression)
expression).getCode()).getStatements();
 
-                        if (statementList.stream().allMatch(x -> !asBoolean(x))) {
+                        if (statementList.stream().noneMatch(x -> asBoolean(x))) {
                             return this.configureAST(new ConstantExpression(null), e);
                         }
 


Mime
View raw message