mirror of https://github.com/apache/jclouds.git
openstack-nova: allowing 'null' ipProtocols returned by hpcloud-compute
This commit is contained in:
parent
a88bf65134
commit
228e3facfa
|
@ -24,6 +24,8 @@ import java.beans.ConstructorProperties;
|
||||||
|
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
|
||||||
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.common.annotations.Beta;
|
import com.google.common.annotations.Beta;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
@ -104,8 +106,8 @@ public class Ingress {
|
||||||
@ConstructorProperties({
|
@ConstructorProperties({
|
||||||
"ip_protocol", "from_port", "to_port"
|
"ip_protocol", "from_port", "to_port"
|
||||||
})
|
})
|
||||||
protected Ingress(IpProtocol ipProtocol, int fromPort, int toPort) {
|
protected Ingress(@Nullable IpProtocol ipProtocol, int fromPort, int toPort) {
|
||||||
this.ipProtocol = checkNotNull(ipProtocol, "ipProtocol");
|
this.ipProtocol = ipProtocol == null ? IpProtocol.UNRECOGNIZED : ipProtocol;
|
||||||
this.fromPort = fromPort;
|
this.fromPort = fromPort;
|
||||||
this.toPort = toPort;
|
this.toPort = toPort;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue