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

spurious unthrown exception error when throw precedes try-finally

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      rc
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description


        ###@###.### 2002-06-04

        J2SE Version (please include all output from java -version flag):
          java version "1.4.1-beta"
          Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b12)
          Java HotSpot(TM) Client VM (build 1.4.1-beta-b12, mixed mode)

        Does this problem occur on J2SE 1.3 or 1.4? Yes / No (pick one)
         works fine with 1.3.1 and 1.4.
         starts with Hopper build 05.

        Operating System Configuration Information (be specific):
          Win2k SP 2 and Solaris

        Hardware Configuration Information (be specific):
          Toshiba Satellite Pro 4200 / Pentium III / 512 MB RAM

        Bug Description:
           Error in the javac compiler/parser.

        Details:
          The following source does not compile under J2SE 1.4, which is correct.
          However, it also does not compile when removing the comments, which is
          incorrect. it works fine with Hopper build04 but having problem since
          build 05.

        public class trytest {
            
            public String test() {
                 // try {
                         if (true) {
                            throw new IllegalAccessException();
                         }
                         try {
                               if (true) {
                                  throw new IllegalAccessException();
                               }
                               else return null;
                         }
                         catch (IllegalAccessException sub) {
                               try {
                                     if (true) {
                                        throw new IllegalAccessException();
                                     }
                               }
                               finally {
                                         return null;
                               }
                          }
                  // }
                  // catch (IllegalAccessException ex) {
                  // return null;
                  // }
            }
        }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                gafter Neal Gafter
                Reporter:
                tyao Ting-Yun Ingrid Yao (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: