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

TTY: surprising ExceptionSpec.resolveEventRequest() wildcard results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.2
    • 1.4.1
    • core-svc
    • None
    • mantis
    • generic
    • generic



      Name: tb29552 Date: 04/19/2002


       From the jdb 'help', we have:
            [...]
         catch <class id> -- break when specified exception thrown
         ignore <class id> -- cancel 'catch' for the specified exception
            [...]
         <class id>: full class name with package qualifiers or a
         pattern with a leading or trailing wildcard ('*').

      A user may believe they are requesting ALL exceptions under
      (for example) java.lang via this command:
          > catch java.lang.*
          Set exception catch java.lang.*

      They will be encouraged in that belief when they see confirmation
      listed back:
          > catch
          Exceptions caught: exception catch java.lang.*

      They will be surprised to learn that the PatternReferenceTypeSpec
      will be resolved to the first class in the vm().allClasses()
      list that isPrepared() and matches the <class id> pattern.

      This means "catch java.lang.*" is not a request for all
      exceptions under java.lang - it will be resolved into a
      request for java.lang.ArithmeticException.

      While that may be a reasonable interpretation, the user-surprising
      piece is that the jdb 'catch' command continues to report:
          > catch
          Exceptions caught: exception catch java.lang.*


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

            tbell Tim Bell
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: