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.
"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.
- relates to
-
JDK-4453310 JDWP: disabling BreakpointRequest expired via addCountFilter: InternalError 113
-
- Closed
-