Bug 236332 - [breadcrumb] Breadcrumb misses throwing exception
Summary: [breadcrumb] Breadcrumb misses throwing exception
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-09 19:39 EDT by Benjamin Muskalla CLA
Modified: 2008-07-10 06:49 EDT (History)
4 users (show)

See Also:
markus.kell.r: review+


Attachments
Fix (1.82 KB, patch)
2008-06-10 04:34 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.