Bug 1756 - Breakpoints installed in all classes with "name*" (1GLCLBW)
Summary: Breakpoints installed in all classes with "name*" (1GLCLBW)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:18 EDT by Darin Swanson CLA
Modified: 2001-10-24 06:40 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2001-10-10 22:18:48 EDT
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.
Comment 1 Jared Burns CLA 2001-10-11 12:57:35 EDT
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).
Comment 2 Darin Wright CLA 2001-10-17 10:49:35 EDT
Verified the test case in this PR works, but Pattern breakpoints are
now broken for patterns that are not an exact match.
Comment 3 Jared Burns CLA 2001-10-17 15:22:50 EDT
Fixed. JavaPatternBreakpoint now overrides
installableReferenceType(ReferenceType), returning true if its pattern is a
substring of the reference type name.
Comment 4 Jared Burns CLA 2001-10-17 15:29:27 EDT
Please verify.
Comment 5 Darin Wright CLA 2001-10-17 18:08:23 EDT
The "*" pattern still fails. I need to debug to see why...
Comment 6 Darin Wright CLA 2001-10-17 18:30:41 EDT
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.
Comment 7 Jared Burns CLA 2001-10-18 10:44:14 EDT
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.
Comment 8 Jared Burns CLA 2001-10-18 10:44:32 EDT
Please verify.
Comment 9 Darin Wright CLA 2001-10-18 11:17:27 EDT
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.

Comment 10 Jared Burns CLA 2001-10-18 18:11:29 EDT
The logic to install JavaPatternBreakpoints in loaded classes was lost during a
recent refactoring. I put it back.
Comment 11 Darin Wright CLA 2001-10-19 11:56:28 EDT
Test suite passes now.
Comment 12 Darin Wright CLA 2001-10-19 11:56:45 EDT
verified.
Comment 13 DJ Houghton CLA 2001-10-24 06:40:00 EDT
PRODUCT VERSION:
203