Hi,
I've run into a NullPointerException in
org.apache.shindig.gadgets.uri.DefaultIframeUriManager.makeRenderingUri in
the case where the gadget spec document neither defines a Content section
with no "view" attribute nor a Content section with a "view" attribute
containing "default". An example gadget is posted below.
The NPE is thrown because the gadget.getCurrentView() call in
makeRenderingUri() returns null. The value returned by
gadget.getCurrentView() is the same as the value returned by
org.apache.shindig.gadgets.process.Processor.getView(GadgetContext,
GadgetSpec). Looking through the code, it seems that if the "view" param
defined in the request is not found for the gadget or not defined at all,
then we try to fall back to the "default" view. However, if that doesn't
exist either, then we get this NPE.
I'm wondering what the expected behavior here should be? I'd rather we
pick a random view for the rendering url then throw a NPE.
Thanks,
-Stanton
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="BadViews"
author="[email protected]">
</ModulePrefs>
<Content type="html" view="profile">
</Content>
<Content type="html" view="canvas">
</Content>
</Module>