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

finally block not called, when "return"ed from catch block

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-2, 1.0-JSR-3
    • 1.0
    • None
    • None
    • Fedora Core 3, Sun JDK1.5.0_01

    Description

      In a groovy script, inside a try block (inside a method), if we have return statement, the corresponding finally block is never called.

      For example, in the attached groovy script, when we call `addTen(20)`, finally block is never called.

      Attachments

        1. tryCatchFinally.groovy
          0.3 kB
          Subhash Chandran

        Activity

          People

            blackdrag Jochen Theodorou
            subwiz Subhash Chandran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: