diff options
author | jross | 2011-04-29 15:41:04 +0000 |
---|---|---|
committer | jross | 2011-04-29 15:41:04 +0000 |
commit | 15e7e81136e616b23c83edec1876d30eb5647c0e (patch) | |
tree | 137c64ff0b6efaed8223478f36eaf7720ae42db9 /bundles/org.eclipse.equinox.metatype | |
parent | 42c3cf44fa7794873258ab5e049d257567aaefde (diff) | |
download | rt.equinox.bundles-15e7e81136e616b23c83edec1876d30eb5647c0e.tar.gz rt.equinox.bundles-15e7e81136e616b23c83edec1876d30eb5647c0e.tar.xz rt.equinox.bundles-15e7e81136e616b23c83edec1876d30eb5647c0e.zip |
Bug 344292 - Metatype: ObjectClassDefinition.getIcon(int) should never return null if an icon exists.
Diffstat (limited to 'bundles/org.eclipse.equinox.metatype')
-rw-r--r-- | bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/ObjectClassDefinitionImpl.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/ObjectClassDefinitionImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/ObjectClassDefinitionImpl.java index a18ab3e4b..244412ece 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/ObjectClassDefinitionImpl.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/ObjectClassDefinitionImpl.java @@ -171,8 +171,13 @@ public class ObjectClassDefinitionImpl extends LocalizationElement implements Ob * @see org.osgi.service.metatype.ObjectClassDefinition#getIcon(int) */ public InputStream getIcon(int sizeHint) throws IOException { - - if ((_icon == null) || (_icon.getIconSize() != sizeHint)) { + // The parameter simply represents a requested size. This method should never return null if an + // icon exists. + // TODO This method may change further depending on the outcome of certain ongoing CPEG discussions. + // It is thought that users should be able to specify the same icon multiple times but of different + // sizes. This would require a change to the XML schema. This method would then return the icon with + // a size closest to the requested size. + if ((_icon == null)) { return null; } Bundle b = _icon.getIconBundle(); |