Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
trustin opened this issue Apr 2, 2024 · 2 comments
Open

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

trustin opened this issue Apr 2, 2024 · 2 comments
Milestone

Comments

@trustin
Copy link
Member

trustin commented Apr 2, 2024

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()
@trustin trustin added this to the 1.28.0 milestone Apr 2, 2024
@erie0210
Copy link

erie0210 commented Apr 2, 2024

I'd like to work on this issue if it's okay.

@jrhee17
Copy link
Contributor

jrhee17 commented Apr 3, 2024

Sure, go for it

@jrhee17 jrhee17 modified the milestones: 1.28.0, 1.29.0 Apr 8, 2024
@minwoox minwoox modified the milestones: 1.29.0, 1.30.0 May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants