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

inlined finally clauses confuse debuggers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • 7
    • tools
    • None
    • b98
    • generic
    • generic
    • Verified

    Description

      =====================================================

      Here is one that could be a bit confusing. When
      stepping, control goes from the if-statement
      directly to the finalizer without ever hitting
      the return statement.

      public class XMain {
          public static void main(String... args) {
              try {
                  boolean duh = false;
                  if (duh == true) {
                      System.out.println(duh);
                      return;
                  } else {
                      System.out.println(duh);
                      return;
                  }
              } finally {
                  System.out.println("finally");
              }
          }
      }

      Attachments

        Issue Links

          Activity

            People

              vromero Vicente Arturo Romero Zaldivar
              ksrini Kumar Srinivasan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: