inlined finally clauses confuse debuggers

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 7
    • Component/s: tools
    • None
    • b98
    • generic
    • generic
    • Verified

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

      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");
              }
          }
      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: