Skip to content

Make ClientRequestContext.authority() and host() return non-null #5552

Open
@trustin

Description

@trustin

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()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions