From a32690a2e0fd177e792f213df638e77d756628f3 Mon Sep 17 00:00:00 2001 From: Dani Estevez Date: Thu, 3 May 2018 15:13:56 -0400 Subject: [PATCH] Protects from NPE input.getLocation() is nullable --- .../compute/extensions/AzureComputeSecurityGroupExtension.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java index b31e2a0d84..b85628c621 100644 --- a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java +++ b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java @@ -116,7 +116,7 @@ public class AzureComputeSecurityGroupExtension implements SecurityGroupExtensio return ImmutableSet.copyOf(filter(securityGroups, new Predicate() { @Override public boolean apply(SecurityGroup input) { - return locations.contains(input.getLocation().getId()); + return input.getLocation() != null && locations.contains(input.getLocation().getId()); } })); }