The NPE is caused by passing the value of `CloudService.location()` to `LocationPredicates.idEquals` which throws a NPE when the argument is `null`. However, `CloudService.location()` is `@Nullable` and is `null` when the cloud service is associated with an affinity group.
The solution in this commit checks if `CloudService.location()` is `null` and if it is, the location is obtained from the affinity group. Fixes https://issues.apache.org/jira/browse/JCLOUDS-1088 You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-labs/pull/243 -- Commit Summary -- * [JCLOUDS-1088] fix NPE in DeploymentToNodeMetadata.apply -- File Changes -- M azurecompute/src/main/java/org/jclouds/azurecompute/compute/functions/DeploymentToNodeMetadata.java (6) -- Patch Links -- https://github.com/jclouds/jclouds-labs/pull/243.patch https://github.com/jclouds/jclouds-labs/pull/243.diff --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/243
