diff --git a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/binders/BindCloneDriveOptionsToPlainTextString.java b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/binders/BindCloneDriveOptionsToPlainTextString.java index 45cb69b6bd..0eb2ba093b 100644 --- a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/binders/BindCloneDriveOptionsToPlainTextString.java +++ b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/binders/BindCloneDriveOptionsToPlainTextString.java @@ -24,7 +24,6 @@ import static com.google.common.base.Preconditions.checkState; import java.util.Map; -import javax.annotation.Nullable; import javax.inject.Inject; import javax.inject.Singleton; import javax.ws.rs.core.MediaType; @@ -68,7 +67,7 @@ public class BindCloneDriveOptionsToPlainTextString implements MapBinder { request.setPayload(listOfMapsToListOfKeyValuesDelimitedByBlankLines.apply(ImmutableSet.of(Maps.transformValues(postParams, new Function() { @Override - public String apply(@Nullable Object input) { + public String apply(Object input) { return input == null ? null : input.toString(); } })))); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java index 59a4418385..904c83fbdd 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java @@ -27,7 +27,6 @@ import static org.jclouds.util.InetAddresses2.isPrivateIPAddress; import java.util.Map; import java.util.Set; -import javax.annotation.Nullable; import javax.inject.Inject; import javax.inject.Singleton; @@ -153,12 +152,12 @@ public class VirtualMachineToNodeMetadata implements Function() { @Override - public boolean apply(@Nullable IPForwardingRule rule) { + public boolean apply(IPForwardingRule rule) { return !"Deleting".equals(rule.getState()); } }), new Function() { @Override - public String apply(@Nullable IPForwardingRule rule) { + public String apply(IPForwardingRule rule) { return rule.getIPAddress(); } })); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/NetworkPredicates.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/NetworkPredicates.java index 1241e4f890..8c63ea4534 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/NetworkPredicates.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/predicates/NetworkPredicates.java @@ -20,8 +20,6 @@ package org.jclouds.cloudstack.predicates; import static com.google.common.base.Preconditions.checkNotNull; -import javax.annotation.Nullable; - import org.jclouds.cloudstack.domain.GuestIPType; import org.jclouds.cloudstack.domain.Network; import org.jclouds.cloudstack.domain.NetworkService; @@ -163,7 +161,7 @@ public class NetworkPredicates { } @Override - public boolean apply(@Nullable GuestIPType guestIPType) { + public boolean apply(GuestIPType guestIPType) { return guestIPType == this.guestIPType; } diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallClientLiveTest.java index 8b190a084e..bdd32acfbf 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallClientLiveTest.java @@ -26,8 +26,6 @@ import static org.testng.Assert.assertTrue; import java.util.NoSuchElementException; import java.util.Set; -import javax.annotation.Nullable; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.FirewallRule; import org.jclouds.cloudstack.domain.Network; @@ -69,7 +67,7 @@ public class FirewallClientLiveTest extends BaseCloudStackClientLiveTest { network = find(client.getNetworkClient().listNetworks(), Predicates.and(supportsPortForwarding(), new Predicate() { @Override - public boolean apply(@Nullable Network network) { + public boolean apply(Network network) { return network.isDefault() && !network.isSecurityGroupEnabled() && network.getAccount().equals(user.getAccount()); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalConfigurationClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalConfigurationClientLiveTest.java index 1d75e21648..093ffe7948 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalConfigurationClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalConfigurationClientLiveTest.java @@ -24,8 +24,6 @@ import static org.testng.Assert.assertEquals; import java.util.Set; -import javax.annotation.Nullable; - import org.jclouds.cloudstack.domain.ConfigurationEntry; import org.jclouds.cloudstack.internal.BaseCloudStackClientLiveTest; import org.testng.annotations.Test; @@ -97,7 +95,7 @@ public class GlobalConfigurationClientLiveTest extends BaseCloudStackClientLiveT private ConfigurationEntry getEntryByName(Set entries, final String name) { return Iterables.find(entries, new Predicate() { @Override - public boolean apply(@Nullable ConfigurationEntry entry) { + public boolean apply(ConfigurationEntry entry) { return entry != null && Objects.equal(name, entry.getName()); } }); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalDomainClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalDomainClientLiveTest.java index 08581e767a..e47baf85c3 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalDomainClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalDomainClientLiveTest.java @@ -23,8 +23,6 @@ import static org.jclouds.cloudstack.options.UpdateDomainOptions.Builder.name; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; -import javax.annotation.Nullable; - import org.jclouds.cloudstack.domain.Domain; import org.jclouds.cloudstack.internal.BaseCloudStackClientLiveTest; import org.testng.annotations.BeforeMethod; @@ -48,7 +46,7 @@ public class GlobalDomainClientLiveTest extends BaseCloudStackClientLiveTest { domainClient = globalAdminClient.getDomainClient(); rootDomain = find(domainClient.listDomains(), new Predicate() { @Override - public boolean apply(@Nullable Domain domain) { + public boolean apply(Domain domain) { return domain != null && domain.getName().equals("ROOT"); } }); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/LoadBalancerClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/LoadBalancerClientLiveTest.java index c7b4c9d2ab..8d8d385cfb 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/LoadBalancerClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/LoadBalancerClientLiveTest.java @@ -30,8 +30,6 @@ import java.util.NoSuchElementException; import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; - import org.jclouds.cloudstack.domain.AsyncJob; import org.jclouds.cloudstack.domain.JobResult; import org.jclouds.cloudstack.domain.LoadBalancerRule; @@ -78,7 +76,7 @@ public class LoadBalancerClientLiveTest extends BaseCloudStackClientLiveTest { Predicates.and(hasLoadBalancerService(), isVirtualNetwork(), new Predicate() { @Override - public boolean apply(@Nullable Network network) { + public boolean apply(Network network) { return network.isDefault() && !network.isSecurityGroupEnabled() && !network.isSystem() diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/TemplateClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/TemplateClientLiveTest.java index e9a8ce0d0e..f4a3173637 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/TemplateClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/TemplateClientLiveTest.java @@ -27,8 +27,6 @@ import java.net.URI; import java.net.URLDecoder; import java.util.Set; -import javax.annotation.Nullable; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.AsyncJob; import org.jclouds.cloudstack.domain.ExtractMode; @@ -107,7 +105,7 @@ public class TemplateClientLiveTest extends BaseCloudStackClientLiveTest { Iterable networks = client.getNetworkClient().listNetworks(ListNetworksOptions.Builder.zoneId(zone.getId()).isDefault(true)); networks = Iterables.filter(networks, new Predicate() { @Override - public boolean apply(@Nullable Network network) { + public boolean apply(Network network) { return network != null && network.getState().equals("Implemented"); } }); @@ -160,7 +158,7 @@ public class TemplateClientLiveTest extends BaseCloudStackClientLiveTest { Iterable networks = client.getNetworkClient().listNetworks(ListNetworksOptions.Builder.zoneId(zone.getId()).isDefault(true)); networks = Iterables.filter(networks, new Predicate() { @Override - public boolean apply(@Nullable Network network) { + public boolean apply(Network network) { return network != null && network.getName().equals("Virtual Network"); } }); @@ -181,7 +179,7 @@ public class TemplateClientLiveTest extends BaseCloudStackClientLiveTest { final String zoneId = zone.getId(); Predicate