Return-Path: Delivered-To: apmail-shindig-issues-archive@www.apache.org Received: (qmail 45861 invoked from network); 14 Jun 2010 20:51:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jun 2010 20:51:39 -0000 Received: (qmail 90991 invoked by uid 500); 14 Jun 2010 20:51:39 -0000 Delivered-To: apmail-shindig-issues-archive@shindig.apache.org Received: (qmail 90929 invoked by uid 500); 14 Jun 2010 20:51:38 -0000 Mailing-List: contact issues-help@shindig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: shindig-dev@shindig.apache.org Delivered-To: mailing list issues@shindig.apache.org Received: (qmail 90920 invoked by uid 99); 14 Jun 2010 20:51:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 20:51:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 20:51:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5EKpEcl000756 for ; Mon, 14 Jun 2010 20:51:14 GMT Message-ID: <11692290.85881276548674514.JavaMail.jira@thor> Date: Mon, 14 Jun 2010 16:51:14 -0400 (EDT) From: "Paul Lindner (JIRA)" To: issues@shindig.apache.org Subject: [jira] Resolved: (SHINDIG-803) hasFeature does not work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SHINDIG-803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Lindner resolved SHINDIG-803. ---------------------------------- Fix Version/s: 2.0.0-RC1 Resolution: Fixed fixed! had to rewrite the patch to support the new classes.. > hasFeature does not work > ------------------------ > > Key: SHINDIG-803 > URL: https://issues.apache.org/jira/browse/SHINDIG-803 > Project: Shindig > Issue Type: Bug > Components: Java, Javascript > Affects Versions: 1.0 > Reporter: Henning Schmiedehausen > Fix For: 2.0.0-RC1 > > 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.