mirror of https://github.com/apache/jclouds.git
the associatedNetwork is @Nullable so guard against (a fatal) NPE
This commit is contained in:
parent
ed471a2eba
commit
95b220f26f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue