[
https://issues.apache.org/jira/browse/WHIRR-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Alves updated WHIRR-394:
------------------------------
Attachment: WHIRR-394.patch
> 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
> Priority: Minor
> Attachments: 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