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

wrapping code in a try finally causes undefined variable error

XMLWordPrintable

    • 1.0alpha3
    • sparc
    • solaris_2.4
    • Not verified

      The following code doesn't compile unless "i" is defined outside the try finally clause.


      class bug {
         bug() {
            try {
      ;
          } finally {
                           for (int i = 0; i < 4; i++) {
      ;
                          }
           
         }
      }

            ahoffsunw Arthur Hoff (Inactive)
            sshaiosunw Sami Shaio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: