Unsupported features are not handled properly
---------------------------------------------

                 Key: SHINDIG-1183
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1183
             Project: Shindig
          Issue Type: Bug
          Components: Java
    Affects Versions: 1.1-BETA3
            Reporter: Jon Weygandt
            Priority: Minor


Per spec section 3.1.3, 5a: 
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadgets-API-Specification.html#process
 unsupported features MUST emit an error message. There are 2 bugs.

Bug 1: Inside of GadgetFeatureRegistry there is a cache based on requested 
features. However the getFeatures may be called from the JS servlet or the 
render servlet. For the JS servlet, the unsupported features are silently 
ignored, but result in a cache entry. Then when called for rendering, the cache 
entry is found, resulting in NO error message happening. This fix took the 
approach of having 2 different caches based upon the presence of the 
unsupported collection argument. GadgetFeatureRegistryTest was modified 
accordingly along with 3 new tests to complete the 2x2 test matrix (called in 
context of JS servlet or render servlet) x (with and without unsupported 
features).

Bug 2: To ensure the error message gets back to the end user, rather than 
logged only server side, RenderingGadgetRewriter needed to throw a 
RewritingException rather than a RuntimeException. Additionally, our 
implementation uses Guice to enhance this implementation, so a number of 
private members have been made protected  to enhance code reuse. Along with the 
changes, the RenderingGadgetRewriterTest was updated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to