Github user SudharmaJain commented on the pull request: https://github.com/apache/cloudstack/pull/1157#issuecomment-212360074 @pedro-martins On line 503, It is not a function but It is a way to define callback method. It has been used all over the cloudstack code. On line 504, context was set and will be available in callback method 'createTemplateAsyncCallBack'. So there are no chances of null pointer exception on line 598. If there was any chance of null pointer exception, it would have happened in my test setup.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---