Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344292 - Metatype: ObjectClassDefinition.getIcon(int) should never return null if an icon exists.
Summary: Metatype: ObjectClassDefinition.getIcon(int) should never return null if an i...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: John Ross CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-29 10:57 EDT by John Ross CLA
Modified: 2011-04-29 11:44 EDT (History)
1 user (show)

See Also:
tjwatson: review+


Attachments
Proposed Patch (1.40 KB, patch)
2011-04-29 10:59 EDT, John Ross CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Ross CLA 2011-04-29 10:57:21 EDT
Currently, the implementation will return null if the size parameter does not match the size of the icon as specified within the <Icon> "size" XML attribute.

The CT is changing so that implementations must never return null if a valid icon exists and the size parameter is a positive integer. The parameter represents the requested size. The icon should always be returned even when it does not represent the requested size.

See
https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1975
https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1974
https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1979
Comment 1 John Ross CLA 2011-04-29 10:59:44 EDT
Created attachment 194366 [details]
Proposed Patch

This patch simply removes the check to see if the requested icon size matches the specified size.
Comment 2 Thomas Watson CLA 2011-04-29 11:11:49 EDT
Patch looks good.  A separate bug should be opened since we think the OSGi schema is wrong and multiple icons should be allowed.  I suggest we address that bug post 3.7.
Comment 3 John Ross CLA 2011-04-29 11:44:45 EDT
Changes committed to head.