[
https://issues.apache.org/jira/browse/SHINDIG-803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henning Schmiedehausen updated SHINDIG-803:
-------------------------------------------
Attachment: SHINDIG-803.patch
This is the q'n'd patch to the core that puts only the elements into the
core.utils map that are actually present on the feature registry. This might
break things like transitive dependencies, but then again, a config object that
was only referenced through transitive dependencies was never put into this
array in the first place. Which might be a bug onto itself...
> hasFeature does not work
> ------------------------
>
> Key: SHINDIG-803
> URL: https://issues.apache.org/jira/browse/SHINDIG-803
> Project: Shindig
> Issue Type: Bug
> Components: Common Components (Java), Features (Javascript)
> Affects Versions: 1.0.0-rc1
> Reporter: Henning Schmiedehausen
> Attachments: SHINDIG-803.patch
>
>
> Digging through the code; I have a test gadget that displays the compliance
> level of a javascript container. It is available at
> http://henning.schmiedehausen.org/gadgets/check.xml. This loads all
> opensocial features as optional and then displays the results of
> hasFeature(), which should only be true if a feature actually exists.
> Consider me surprised, when this gadget found out that most popular
> containers already support opensocial-1.0. :-)
> The current shindig code builds an array of features from the gadget in
> RenderingContentRewriter.java:354. For all features referenced by the gadget,
> this will contain an entry with the configuration. Even for the ones that are
> optional.
> in core.io/utils.js, the hasFeature() method only tests the presence of a key
> in this array. Which is always present if a feature is referenced by the
> gadget spec. No matter whether it exists or not. It will always report the
> feature existing. As the Optional/hasFeature combo is the only way to find
> out whether a given feature requested by a gadget is actually present, I
> consider this a bug. :-)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.