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:14:09 UTC
[groovy] branch GROOVY_3_0_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_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new c7741df GROOVY-9602: return more specific type for ifS/ifElseS helper methods in GeneralUtils
c7741df is described below
commit c7741df70d1f65b44dd47df8509565689a33700a
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 12e6653..e05ae67 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
@@ -563,7 +563,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 : boolX(cond),
thenStmt,
@@ -571,11 +576,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 ifElseS(cond, stmt(trueExpr), EmptyStatement.INSTANCE);
}
- 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 ifElseS(cond, trueStmt, EmptyStatement.INSTANCE);
}