You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/08/06 10:02:00 UTC
[jira] [Comment Edited] (GROOVY-8847) TryCatchStatement - adding
constructor with List parameter
[ https://issues.apache.org/jira/browse/GROOVY-8847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17172116#comment-17172116 ]
Paul King edited comment on GROOVY-8847 at 8/6/20, 10:01 AM:
-------------------------------------------------------------
There are some helper methods in GeneralUtils now but not a variant with catch statements.
{color:#DE350B}UPDATE{color}: I just added an additional {{CatchStatement...}} variant in the helper methods.
was (Author: paulk):
There are some helper methods in GeneralUtils now but not a variant with catch statements.
> TryCatchStatement - adding constructor with List<CatchStatement> parameter
> --------------------------------------------------------------------------
>
> Key: GROOVY-8847
> URL: https://issues.apache.org/jira/browse/GROOVY-8847
> Project: Groovy
> Issue Type: Improvement
> Affects Versions: 2.5.2
> Reporter: Anton Pryamostanov
> Priority: Minor
> Labels: ast
>
> Currently TryCatchStatement only has 1 constructor:
> {code}
> public TryCatchStatement(Statement tryStatement, Statement finallyStatement) {
> this.tryStatement = tryStatement;
> this.finallyStatement = finallyStatement;
> }
> {code}
> As per existing practice for other Statements and Expressions, suggest to add the missing constructor:
> {code}
> public TryCatchStatement(Statement tryStatement, Statement finallyStatement, List<CatchStatement> catchStatements) {
> this.tryStatement = tryStatement;
> this.finallyStatement = finallyStatement;
> this.catchStatements = catchStatements;
> }
> {code}
> This will make initialization easier.
> Note: GeneralUtils does not have helper method for TryCatchStatement.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)