DescriptionPer 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.
Patch Set 1 #
MessagesTotal messages: 1
|