SiteStructure generates NPE when used with ActionBean without @UrlBinding
-------------------------------------------------------------------------

                 Key: STS-612
                 URL: http://www.stripesframework.org/jira/browse/STS-612
             Project: Stripes
          Issue Type: Bug
          Components: Documentation
    Affects Versions: Release 1.5
         Environment: All
            Reporter: Andrew Jaquith
            Priority: Minor


I've been using the SiteStructure tool to generate documentation for my 
ActionBeans. I've encountered an NPE that is triggered if an ActionBean does 
not contain an URLBinding annotation. Here's the error message:

    [exec] java.lang.NullPointerException
     [exec]     at 
net.sourceforge.stripes.tools.SiteStructureTool.processHandlerAnnotations(SiteStructureTool.java:265)

Here is example of an ActionBean that generates the error:

public class NoneActionBean implements ActionBean
{
    @DefaultHandler
    @HandlesEvent( "none" )
    @WikiRequestContext( "none" )
    public Resolution view()
    {
        return null;
    }

    private ActionBeanContext context;
    
    public ActionBeanContext getContext()
    {
        return context;
    }

    public void setContext( ActionBeanContext context )
    {
        this.context = context;
    }

}

Adding a @UrlBinding annotation causes the NPE to go away.

Recommendation: modify the processUrlBindings() method to check for the 
non-presence of @UrlBinding when adding an entry to the 'infos' Map, or 
(probably better) perform defensive checking in processHandlerAnnotations().

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to