Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 236332

Summary: [breadcrumb] Breadcrumb misses throwing exception
Product: [Eclipse Project] JDT Reporter: Benjamin Muskalla <b.muskalla>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: benno.baumgartner, daniel_megert, markus.kell.r, martinae
Version: 3.4Flags: markus.kell.r: review+
Target Milestone: 3.5 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Benjamin Muskalla CLA 2008-06-09 19:39:18 EDT
JDT UI from CVS HEAD as of today (06/10/2008).

Just stumbled across EditorBreadcrumb#createContent

public Control createContent(Composite parent) {
	if (fComposite != null)
		new IllegalArgumentException("Content must only be created once."); //$NON-NLS-1$
		
There is a "throw" missing in order to achieve the goal.
Comment 1 Dani Megert CLA 2008-06-10 04:34:36 EDT
Created attachment 104285 [details]
Fix
Comment 2 Benno Baumgartner CLA 2008-06-10 04:38:51 EDT
Ooops, my fault. This is not the first time that this happens to me. I've filed bug 236385 against JDT/Core to add a compiler warning for this.
Comment 3 Dani Megert CLA 2008-06-10 04:42:36 EDT
Use Assert to prevent this problem.
Comment 4 Martin Aeschlimann CLA 2008-06-10 04:52:58 EDT
I suggest to to fix for 3.5 rather than 3.4.1
Comment 5 Benno Baumgartner CLA 2008-06-10 04:55:35 EDT
(In reply to comment #4)
> I suggest to to fix for 3.5 rather than 3.4.1
> 

Yes, why 3.4.1? No harm done, if you call it twice you probably will get 2 breadcrumbs.
Comment 6 Dani Megert CLA 2008-06-10 05:05:38 EDT
>if you call it twice you probably will get 2 breadcrumbs.
Yes, "probably", but you don't know whether this will work at all then. So it's better to make that fix and get feedback in case this really happens.
Comment 7 Dani Megert CLA 2008-07-09 09:54:05 EDT
Fixed in HEAD.
Available in builds > N20080708-2000.
Comment 8 Markus Keller CLA 2008-07-10 06:43:53 EDT
Fix is good, although not really relevant for 3.4.1.
Comment 9 Dani Megert CLA 2008-07-10 06:49:37 EDT
OK, so we have 3 people that don't want/need this for 3.4.1 so let's drop it.