Skip to content

Commit

Permalink
Avoid npe in netty 4.1 instrumentation (#5902)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Apr 21, 2022
1 parent d949a82 commit ceeaa1b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public final class InstrumentedAddressResolverGroup<T extends SocketAddress>

public static <T extends SocketAddress> AddressResolverGroup<T> wrap(
NettyConnectionInstrumenter instrumenter, AddressResolverGroup<T> delegate) {
if (delegate instanceof InstrumentedAddressResolverGroup) {
if (delegate == null || delegate instanceof InstrumentedAddressResolverGroup) {
return delegate;
}
return new InstrumentedAddressResolverGroup<>(instrumenter, delegate);
Expand Down

0 comments on commit ceeaa1b

Please sign in to comment.