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

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

This comment has been minimized.

Copy link
Contributor

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.

@ChristopherDavenport

This comment has been minimized.

Copy link
Member

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

@rossabaker

This comment has been minimized.

Copy link
Member Author

commented Jun 2, 2019

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

@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

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@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
Projects
None yet
3 participants
You can’t perform that action at this time.