Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023292

14.20: multi-catch terminology leaked into uni-catch rule

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 8
    • 7
    • specification

      JLS7 14.20 says "In a uni-catch clause, an exception parameter that is not declared final (implicitly or explicitly) is considered effectively final ...". But there is no possibility in a uni-catch clause of the parameter being implicitly final, as "implicitly declared final" is a multi-catch thing. In uni-catch, either there's an explicit 'final' or there isn't; in the latter case, we may have found an effectively final parameter.

      JLS8 should say "An exception parameter of a uni-catch clause is considered effectively final if it is not explicitly declared final and it never occurs within its scope..."

            abuckley Alex Buckley
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: