Community
Participate
Working Groups
DS (10/9/01 4:16:49 PM) Create two classes Action and Action2 put a breakpoint on line 5 of Action Debug Action You hit the breakpoint in Action2 public class Action { public static void main(String[] args) { Action2 a= new Action2(); System.out.println("main"); } } public class Action2 { public Action2() { System.out.println("Constructor"); System.out.println("Constructor2"); } } NOTES: JMB (10/10/2001 3:24:24 PM) When a breakpoint receives a classload event, it should check to see if the classload event's ReferenceType matches the breakpoint's reference type. The breakpoint should only be installed in the class if the event's reference type matches the breakpoint's exactly or if the event's type is an exact match of the breakpoint's followed by a '$' - this is to maintain inner class functionality.
Implemented check in JavaBreakpoint#handleEvent() to ensure that breakpoints are only installed in appropriate classes (classes whose names match the breakpoint's installed reference type).
Verified the test case in this PR works, but Pattern breakpoints are now broken for patterns that are not an exact match.
Fixed. JavaPatternBreakpoint now overrides installableReferenceType(ReferenceType), returning true if its pattern is a substring of the reference type name.
Please verify.
The "*" pattern still fails. I need to debug to see why...
The method #addToTarget() checks is the #getReferenceTypeName() for a breakpoint is "", and does not add the breakpoint. A pattern breakpoint that uses the generic "any type" pattern, returns "" as the reference type name and is never installed.
Fixed. #getReferenceType now returns null as an error code. #addToTarget (and other references) updated to reflect this change. #addToTarget also pushed up the hierarchy into JavaBreakpoint. Its implementation in JavaLineBreakpoint and JavaExceptionBreakpoint was identical.
Pattern breakpoints now work in the deferred case, but a partial match patten and a generic match pattern do not work in the non-deferred case.
The logic to install JavaPatternBreakpoints in loaded classes was lost during a recent refactoring. I put it back.
Test suite passes now.
verified.
PRODUCT VERSION: 203