Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8847

TryCatchStatement - adding constructor with List<CatchStatement> parameter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Information Provided
    • 2.5.2
    • None
    • None

    Description

      Currently TryCatchStatement only has 1 constructor:

          public TryCatchStatement(Statement tryStatement, Statement finallyStatement) {
              this.tryStatement = tryStatement;
              this.finallyStatement = finallyStatement;
          }
      

      As per existing practice for other Statements and Expressions, suggest to add the missing constructor:

          public TryCatchStatement(Statement tryStatement, Statement finallyStatement, List<CatchStatement> catchStatements) {
              this.tryStatement = tryStatement;
              this.finallyStatement = finallyStatement;
              this.catchStatements = catchStatements;
          }
      

      This will make initialization easier.
      Note: GeneralUtils does not have helper method for TryCatchStatement.

      Attachments

        Activity

          People

            Unassigned Unassigned
            anton.pryamostanov Anton Pryamostanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: