[ 
https://issues.apache.org/jira/browse/WHIRR-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Savu resolved WHIRR-394.
-------------------------------

    Resolution: Fixed

Committed. Thanks David for reviewing. 
                
> NPE used for flow control
> -------------------------
>
>                 Key: WHIRR-394
>                 URL: https://issues.apache.org/jira/browse/WHIRR-394
>             Project: Whirr
>          Issue Type: Bug
>          Components: core
>            Reporter: David Alves
>            Assignee: David Alves
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: WHIRR-394.patch, WHIRR-394.patch, WHIRR-394.patch
>
>
> ScriptBasedClusterAction is using NPE for flow control.
>  public Cluster execute(ClusterSpec clusterSpec, Cluster cluster) throws 
> IOException, InterruptedException {
> ...
> for (String role : instanceTemplate.getRoles()) {
>         try {
>           handlerMap.get(role).beforeAction(event);
>         } catch (NullPointerException e) {
>           throw new IllegalArgumentException("No handler for role " + role);
>         }
> }
> ...
> }
> I just lost about an hour trying to find out why the actionhandler was not 
> being registered while the NPE came from the beforeAction() call.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to