Skip to content

Commit

Permalink
[#9120] Backport: fix npe bug in mongo plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jaehong-kim committed Aug 11, 2022
1 parent a0d9abb commit 6806635
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public void after(Object target, Object[] args, Object result, Throwable throwab
if (list != null) {
for (Object o : list) {
if (o instanceof ServerAddress) {
final String hostAddress = HostAndPort.toHostAndPortString(serverAddress.getHost(), serverAddress.getPort());
// Set multi address.
final ServerAddress address = (ServerAddress) o;
final String hostAddress = HostAndPort.toHostAndPortString(address.getHost(), address.getPort());
hostList.add(hostAddress);
}
}
Expand Down

0 comments on commit 6806635

Please sign in to comment.