You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/06/20 10:18:28 UTC
[groovy] branch GROOVY_2_5_X updated: GROOVY-9602: return more
specific type for ifS/ifElseS helper methods in GeneralUtils
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
new 6db4b34 GROOVY-9602: return more specific type for ifS/ifElseS helper methods in GeneralUtils
6db4b34 is described below
commit 6db4b34ef7fbea4f818ca47604926fbd93c14bd7
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Jun 20 15:36:49 2020 +1000
GROOVY-9602: return more specific type for ifS/ifElseS helper methods in GeneralUtils
---
.../org/codehaus/groovy/ast/tools/GeneralUtils.java | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
index ef29049..feacc0d 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
@@ -545,7 +545,12 @@ public class GeneralUtils {
return sameX(getterThisX(cNode, pNode), getterX(cNode, other, pNode));
}
- public static Statement ifElseS(final Expression cond, final Statement thenStmt, final Statement elseStmt) {
+ @Deprecated
+ public static Statement ifElseS$$bridge(final Expression cond, final Statement thenStmt, final Statement elseStmt) {
+ return ifElseS(cond, thenStmt, elseStmt);
+ }
+
+ public static IfStatement ifElseS(final Expression cond, final Statement thenStmt, final Statement elseStmt) {
return new IfStatement(
cond instanceof BooleanExpression ? (BooleanExpression) cond : new BooleanExpression(cond),
thenStmt,
@@ -553,11 +558,21 @@ public class GeneralUtils {
);
}
- public static Statement ifS(final Expression cond, final Expression trueExpr) {
+ @Deprecated
+ public static Statement ifS$$bridge(final Expression cond, final Expression trueExpr) {
+ return ifS(cond, trueExpr);
+ }
+
+ public static IfStatement ifS(final Expression cond, final Expression trueExpr) {
return ifS(cond, new ExpressionStatement(trueExpr));
}
- public static Statement ifS(final Expression cond, final Statement trueStmt) {
+ @Deprecated
+ public static Statement ifS$$bridge(final Expression cond, final Statement trueStmt) {
+ return ifS(cond, trueStmt);
+ }
+
+ public static IfStatement ifS(final Expression cond, final Statement trueStmt) {
return new IfStatement(
cond instanceof BooleanExpression ? (BooleanExpression) cond : new BooleanExpression(cond),
trueStmt,