> +import java.util.Set; > + > +import static com.google.common.base.Preconditions.checkNotNull; > + > +/** > + * @author Andrea Turli > + */ > +public class ExposedPorts { > + > + private final String portAndProtocol; > + private final Set<String> hostPorts; > + > + @ConstructorProperties({ "PortAndProtocol", "HostPorts" }) > + public ExposedPorts(String portAndProtocol, Set<String> hostPorts) { > + this.portAndProtocol = checkNotNull(portAndProtocol, > "portAndProtocol"); > + this.hostPorts = hostPorts != null ? ImmutableSet.copyOf(hostPorts) : > ImmutableSet.<String> of();
If `hostPorts` can be null, annotate it as `@Nullable`, otherwise add a null check. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57/files#r12937518