ClientRequestContext.authority() and host() may return null until the context is fully initialized. I believe there's only a small fraction of situation where a partially initialized context is available to a user. Could we make them non-null and raise an exception instead of returning null?
There are two cases a user may see a partially initialized context:
- A user retrieves the
ClientRequestContext via Clients.newContextCaptor() and withContextCustomizer().
EndpointGroup.selectNow() and select()
ClientRequestContext.authority()andhost()may returnnulluntil the context is fully initialized. I believe there's only a small fraction of situation where a partially initialized context is available to a user. Could we make them non-null and raise an exception instead of returningnull?There are two cases a user may see a partially initialized context:
ClientRequestContextviaClients.newContextCaptor()andwithContextCustomizer().EndpointGroup.selectNow()andselect()