mirror of https://github.com/grpc/grpc-java.git
ManagedChannelImpl.SubchannelImpl args check bug (#9651)
Previously it could trigger NPE without the string saying which argument was null.
This commit is contained in:
parent
b8f142c1e7
commit
096898a46e
|
@ -1942,13 +1942,14 @@ final class ManagedChannelImpl extends ManagedChannel implements
|
|||
ScheduledHandle delayedShutdownTask;
|
||||
|
||||
SubchannelImpl(CreateSubchannelArgs args, LbHelperImpl helper) {
|
||||
checkNotNull(args, "args");
|
||||
addressGroups = args.getAddresses();
|
||||
if (authorityOverride != null) {
|
||||
List<EquivalentAddressGroup> eagsWithoutOverrideAttr =
|
||||
stripOverrideAuthorityAttributes(args.getAddresses());
|
||||
args = args.toBuilder().setAddresses(eagsWithoutOverrideAttr).build();
|
||||
}
|
||||
this.args = checkNotNull(args, "args");
|
||||
this.args = args;
|
||||
this.helper = checkNotNull(helper, "helper");
|
||||
subchannelLogId = InternalLogId.allocate("Subchannel", /*details=*/ authority());
|
||||
subchannelTracer = new ChannelTracer(
|
||||
|
|
Loading…
Reference in New Issue