Skip to content

Commit

Permalink
Fixed potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-v committed Sep 3, 2023
1 parent 51a910c commit 106d0f8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ private ServiceEndpoint newServiceEndpoint(ServiceEndpoint.Builder builder) {

addresses.add(transportBootstrap.transportAddress);

for (String externalHost : externalHosts) {
addresses.add(Address.create(externalHost, transportBootstrap.transportAddress.port()));
if (externalHosts != null) {
for (String externalHost : externalHosts) {
addresses.add(Address.create(externalHost, transportBootstrap.transportAddress.port()));
}
}

return builder.addresses(addresses).build();
Expand Down

0 comments on commit 106d0f8

Please sign in to comment.