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

JDWP: filters subsequent to addCountFilter() has no effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • core-svc
    • None
    • beta2
    • generic
    • generic
    • Not verified

      API for EventRequest.addCountFilter(int) states that
       "Once the count reaches 0, any subsequent filters in this request are applied.
       If none of those filters cause the event to be suppressed, the event is
       reported. Otherwise, the event is not reported. In either case subsequent
       events are never reported for this request."

       The second part of the statement " Otherwise, the event is not reported."
       does not work. Any filter subsequent to addCountFilter() which suppresses the
       event has no effect.

       
       Scenario:
       ---------
       MethodFilterTest.java - Debugger
       MethodTest.java - Debugee
       MethodTest1.java - Helper Class
       
       Breakpoint is set at line number 10 in MethodTest and the MethodEntryRequest
       is created and enabled after adding
          request.addCountFilter(10);
          request.addClassFilter(referenceType);
       As the MethodTest.testMethod1() and MethodTest1.testMethod() are called in a
       loop MethodEntryEvents will be generated for both these methods when request
       is made without any filter.
       With count filter alone MethodEntryEvent will be generated as below
       
       ###@###.###Method()+0 in thread main count 5
       
       When addClassFilter(referenceType) is added(For MethodTest class)
       this should suppress the event and hence the event should not be reported.
       ***But an event for MethodTest1.testMethod() is reported.
       
       Same behaviour is got for BreakpointRequest and ThreadStartRequest.
       Testcase for BreakpointRequest is also included.
       
       
       ***Testing done in JDK1.3.0rc2-V-Hotspot and Classic VM(WinNT and Solaris2.7)

       Steps to reproduce the bug
       ---------------------------
       The bug can be reproduced using the files in the location
       /net/sqesvr/export/disk5/toolsbugs/4321339
       Follow the instructions in README to reproduce the bug.

            rfield Robert Field (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: