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

Defer creation of SSLContext.getDefault() in the client #2604

Merged
merged 1 commit into from Jun 5, 2019

Conversation

@rossabaker
Copy link
Member

@rossabaker rossabaker commented May 29, 2019

SSLContext.getDefault() throws on some platforms, which makes it untenable to pass as a default argument to the builders. We use an Option to signify deferred creation.

Hard to test. We'd need to do some byte code magic to intercept the creation of SSLContext.default, or fork a JVM configured such that it fails.

Fixes #2431.

@kevinmeredith
Copy link
Contributor

@kevinmeredith kevinmeredith commented Jun 1, 2019

We use an Option to signify deferred creation.

Could you please explain why Option indicates deferred creation? When I read "deferred creation," I think of by-name arguments.

Loading

@ChristopherDavenport
Copy link
Member

@ChristopherDavenport ChristopherDavenport commented Jun 1, 2019

Due to how implicit resolution works, constraints are always the last arguments so can not be used in default arguments. By suspension we mean like Sync[F].delay

Loading

@rossabaker
Copy link
Member Author

@rossabaker rossabaker commented Jun 2, 2019

Later might be a better encoding when we break compatibility. Or SyncIO.

Loading

@rossabaker rossabaker added this to the 0.20.2 milestone Jun 5, 2019
@rossabaker rossabaker merged commit 1ec0a6b into series/0.20 Jun 5, 2019
2 checks passed
Loading
@rossabaker rossabaker deleted the issue-2431 branch Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants