Uploaded image for project: 'Eagle (Retired)'
  1. Eagle (Retired)
  2. EAGLE-1009

`return` inside `finally` block may result in losing exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • v0.4.0
    • v0.5.0
    • Project Infrastructure

    Description

      `return` inside `finally` block will result in losing exception:

      • If the finally block completes abruptly for reason S, then the try statement completes abruptly for reason S (and the throw of value V is discarded and forgotten).
      • If the finally block completes abruptly for reason S, then the try statement completes abruptly for reason S (and reason R is discarded).

      reference:
      http://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20.2

      Attachments

        1. FinallyTest.java
          3 kB
          Benedict Jin

        Issue Links

          Activity

            People

              Unassigned Unassigned
              benedict jin Benedict Jin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified