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

ApolloClient.Builder.okHttpClient() returns null instead of this #5777

Closed
japhib opened this issue Apr 2, 2024 · 3 comments
Closed

ApolloClient.Builder.okHttpClient() returns null instead of this #5777

japhib opened this issue Apr 2, 2024 · 3 comments

Comments

@japhib
Copy link
Contributor

japhib commented Apr 2, 2024

Version

main

Summary

This code:

new ApolloClient.Builder().okHttpClient(okHttpClient()).build()

throws a NullPointerException because the okHttpClient setter method on ApolloClient.Builder returns null rather than this.

The javadoc for that method says this:

@return The {@link Builder} object to be used for chaining method calls

which makes it seem like a typo.

Steps to reproduce the behavior

Run new ApolloClient.Builder().okHttpClient(new OkHttpClient()).build() and observe that a NullPointerException is thrown.

Logs

No response

@japhib
Copy link
Contributor Author

japhib commented Apr 2, 2024

PR: #5778

@martinbonnin martinbonnin added the ✔️ Fixed in SNAPSHOTs The fix has been merged and is available in SNAPSHOTs, and will be available in the next release label Apr 16, 2024
@BoD BoD added ✅ Fixed in v4 and removed ✔️ Fixed in SNAPSHOTs The fix has been merged and is available in SNAPSHOTs, and will be available in the next release labels Apr 24, 2024
BoD pushed a commit that referenced this issue Apr 29, 2024
@BoD
Copy link
Contributor

BoD commented Apr 30, 2024

Fixed in 3.8.4

@BoD BoD closed this as completed Apr 30, 2024
Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.

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

3 participants