Bug 279235 - [JFace] MessageDialog#getButton(int) breaks contract of Dialog#getButton(int)
Summary: [JFace] MessageDialog#getButton(int) breaks contract of Dialog#getButton(int)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Markus Keller CLA
QA Contact: Susan McCourt CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2009-06-05 06:41 EDT by Markus Keller CLA
Modified: 2009-12-16 08:48 EST (History)
2 users (show)

See Also:


Attachments
Fix (1.35 KB, patch)
2009-06-05 11:08 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2009-06-05 06:41:20 EDT
I20090603-2000

MessageDialog#getButton(int) breaks the contact of Dialog#getButton(int). It should not throw an AIOOBE but return null if there's no button with the given ID.
Comment 1 Markus Keller CLA 2009-06-05 11:08:14 EDT
Created attachment 138417 [details]
Fix

I also added a note to the class Javadoc to explain how it bends the rules ... I mean: ... how it interprets IDs.
Comment 2 Markus Keller CLA 2009-12-16 08:48:08 EST
Fixed in HEAD.