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 2020/10/05 20:31:46 UTC
[groovy] branch GROOVY-8258 updated: GROOVY-8258: trivial
refactoring
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY-8258
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY-8258 by this push:
new 7debbb0 GROOVY-8258: trivial refactoring
7debbb0 is described below
commit 7debbb0b1e677e7e721acbf6b11b70ebbc2d54b9
Author: Daniel Sun <su...@apache.org>
AuthorDate: Tue Oct 6 04:31:26 2020 +0800
GROOVY-8258: trivial refactoring
---
.../groovy/org/apache/groovy/linq/dsl/GinqBuilder.groovy | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/subprojects/groovy-linq/src/main/groovy/org/apache/groovy/linq/dsl/GinqBuilder.groovy b/subprojects/groovy-linq/src/main/groovy/org/apache/groovy/linq/dsl/GinqBuilder.groovy
index bbfe3cb..fdb2e96 100644
--- a/subprojects/groovy-linq/src/main/groovy/org/apache/groovy/linq/dsl/GinqBuilder.groovy
+++ b/subprojects/groovy-linq/src/main/groovy/org/apache/groovy/linq/dsl/GinqBuilder.groovy
@@ -50,12 +50,6 @@ import static org.codehaus.groovy.ast.tools.GeneralUtils.stmt
@CompileStatic
class GinqBuilder implements GinqVisitor<Object> {
- public static final String __RECEIVER_ALIAS_EXPR = "__receiverAliasExpr"
- public static final String __INNER_JOIN_METHOD_RECEIVER = "__inner_join_method_receiver"
- public static final String __T = "__t"
- public static final String __FIRST_ALIAS_EXPR = "__first_alias_expr"
- public static final String __SECOND_ALIAS_EXPR = "__second_alias_expr"
-
@Override
MethodCallExpression visitSimpleGinqExpression(SimpleGinqExpression simpleGinqExpression) {
List<MethodCallExpression> fromMethodCallExpressionList = new LinkedList<>()
@@ -168,7 +162,7 @@ class GinqBuilder implements GinqVisitor<Object> {
Expression aliasExpr = selectExpression.getNodeMetaData(__ALIAS_EXPR)
Expression projectionExpr = selectExpression.getProjectionExpr()
- if (__T.equals(aliasExpr.text)) {
+ if (__T == aliasExpr.text) {
projectionExpr = correctVariablesOfProjectExpression(selectExpression, projectionExpr)
}
@@ -239,6 +233,11 @@ class GinqBuilder implements GinqVisitor<Object> {
private static final String __FROM_EXPRESSION = "__fromExpression"
private static final String __FROM_METHOD_CALL_EXPRESSION = "__fromMethodCallExpression"
- private static final String __SELECT_METHOD_RECEIVER = "__selectMethodReceiver"
private static final String __ALIAS_EXPR = "__aliasExpr"
+ private static final String __RECEIVER_ALIAS_EXPR = "__receiverAliasExpr"
+ private static final String __INNER_JOIN_METHOD_RECEIVER = "__innerJoinMethodReceiver"
+ private static final String __T = "__t"
+ private static final String __FIRST_ALIAS_EXPR = "__firstAliasExpr"
+ private static final String __SECOND_ALIAS_EXPR = "__secondAliasExpr"
+ private static final String __SELECT_METHOD_RECEIVER = "__selectMethodReceiver"
}