Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 57735 - When including assert tags in private method, breakpoint can't be set
Summary: When including assert tags in private method, breakpoint can't be set
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-07 09:46 EDT by Brian Bonner CLA
Modified: 2004-04-21 14:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Bonner CLA 2004-04-07 09:46:21 EDT
if the following lines are inserted at the top of a method

private void foo(String bar){
   assert bar!=null : bar;
   System.out.println(bar);   // try to set break point here
}

The breakpoint cannot be set at the System.out.println line.  It appears before
the close brace.


private void foo(String bar){
   assert bar!=null : bar;
   System.out.println(bar);
} // break point gets set here.
Comment 1 Luc Bourlier CLA 2004-04-07 16:00:56 EDT
Fixed.
We were not specifying the compiler options when parsing the source to check the
if breakpoint location is valid.
In this case, the AST of the code of the method was no generated because the
assert statement was seen as an error. For the breakpoint location verifier, the
method was empty and the breakpoint was set on the last line of the block.
Changes in BreakpointLocationVerifierJob#run()
Comment 2 Luc Bourlier CLA 2004-04-07 16:01:15 EDT
Please verify, Darin W.
Comment 3 Brian Bonner CLA 2004-04-07 16:37:17 EDT
Thanks for taking a look at it so quickly.
Comment 4 Darin Wright CLA 2004-04-21 14:28:50 EDT
Verified.