Skip to content

Commit

Permalink
fix(kubernetes): Empty port causing NPE during caching (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwander committed Apr 24, 2017
1 parent 3e8faeb commit 87001b6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ class KubernetesApiConverter {
}

def kubernetesTcpSocketAction = new KubernetesTcpSocketAction()
kubernetesTcpSocketAction.port = tcpSocket.port?.intVal
kubernetesTcpSocketAction.port = tcpSocket.port?.intVal ?: 0
return kubernetesTcpSocketAction
}

Expand All @@ -759,7 +759,7 @@ class KubernetesApiConverter {
def kubernetesHttpGetAction = new KubernetesHttpGetAction()
kubernetesHttpGetAction.host = httpGet.host
kubernetesHttpGetAction.path = httpGet.path
kubernetesHttpGetAction.port = httpGet.port?.intVal
kubernetesHttpGetAction.port = httpGet.port?.intVal ?: 0
kubernetesHttpGetAction.uriScheme = httpGet.scheme
kubernetesHttpGetAction.httpHeaders = httpGet.httpHeaders?.collect() {
new KeyValuePair(name: it.name, value: it.value)
Expand Down

0 comments on commit 87001b6

Please sign in to comment.