JDI: ClassPrepareRequest.addClassFilter(String) fails to restrict events

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.3.0
    • Component/s: core-svc
    • x86
    • windows_98



      Name: rlT66838 Date: 05/02/2000


      java version "1.3.0rc2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
      Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, mixed mode)


      The API docs for ClassPrepareRequest.addClassFilter(String pattern) indicate
      that events are to be restricted to classnames matching this pattern or
      matching the name exactly if no '*' wildcard characters are used. We have found
      that in certain cases when we want restrict events to a specific class using an
      exact match pattern (ie. no wildcard characters are used), events are generated
      for the restricted class as well as for any classes/interfaces that are part of
      this class's class/interface hierarchy whose names start with the restricted
      class name. For example:

      class Test extends TestBase implements TestInterface {
         public static class main(String[] args) {}
      }

      class TestBase {}
      interface TestInterface {}
      interface TestNotUsed {}

      ClassPrepareRequest req = eventRequestManager.createClassPrepareRequest()
      req.addClassFilter("Test");
      req.enable()

      ClassPrepareEvents will be generated for Test as well as TestBase and
      TestInterface but not TestNotUsed. It is as if we did addClassFilter("Test*")
      except that only those classes/interfaces that are part of Test's
      class/interface hierarchy have events generated for them.
      (Review ID: 104330)
      ======================================================================

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: