From 95b220f26f1658b23aeecd771a0826821b4966c4 Mon Sep 17 00:00:00 2001 From: Alex Heneveld Date: Fri, 30 Nov 2012 15:55:51 -0800 Subject: [PATCH] the associatedNetwork is @Nullable so guard against (a fatal) NPE --- .../cloudstack/predicates/PublicIPAddressPredicates.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/PublicIPAddressPredicates.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/PublicIPAddressPredicates.java index e8f082fbde..462061811c 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/PublicIPAddressPredicates.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/PublicIPAddressPredicates.java @@ -35,12 +35,12 @@ public class PublicIPAddressPredicates { private final String networkId; public AssociatedWithNetwork(String networkId) { - this.networkId = networkId; + this.networkId = checkNotNull(networkId, "networkId"); } @Override public boolean apply(PublicIPAddress input) { - return checkNotNull(input, "ipaddress").getAssociatedNetworkId().equals(networkId); + return networkId.equals(checkNotNull(input, "ipaddress").getAssociatedNetworkId()); } @Override