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

Upgrade group("com.squareup.okhttp3") to 4.4.1 and start using bom. #20592

Closed
wants to merge 1 commit into from

Conversation

kazuki-ma
Copy link

First: I don't know if there are any reason to avoid upgrade OkHttp to 4.x. Sorry if I'm sending PR about already rejected topic.


  • Upgrade OkHttp to 4.4.1

According to https://square.github.io/okhttp/upgrading_to_okhttp_4/, 4.x has strict compatibility for 3.x. So upgrade to 4.x by dependency management is safer than typical major upgrade.

Binary compatibility is the ability to compile a program against OkHttp 3.x, and then to run it against OkHttp 4.x. We’re using the excellent japicmp library via its Gradle plugin to enforce binary compatibility.
https://square.github.io/okhttp/upgrading_to_okhttp_4/

  • 2 test cases are updated due to OkHttp's internal field name is changed. (RestTemplateBuilderTests.java)

  • Also InfluxDbProperties is changed due to issue in influxdb-java.

    • Under OkHttp3, influxdb-java sends "Authorization: encode(null:null"
    • Under new version of OkHttp, null username & password not leads illegal BasicAuth configuration but throws NullPointer exception.
    • Anyway, if user don't use auth, nothing affected I think.

This issue fixed in https://github.com/influxdata/influxdb-java/pull/644/files#diff-23360835991a654afd56314b41590521L150-R155, but not released yet.

* Upgrade OkHttp to 4.4.1

According to https://square.github.io/okhttp/upgrading_to_okhttp_4/, 4.x has perfect binary compatibility for 3.x
> Binary compatibility is the ability to compile a program against OkHttp 3.x, and then to run it against OkHttp 4.x. We’re using the excellent japicmp library via its Gradle plugin to enforce binary compatibility.
> https://square.github.io/okhttp/upgrading_to_okhttp_4/

* 2 test cases are updated due to OkHttp's internal field name is changed. (RestTemplateBuilderTests.java)

* Also InfluxDbProperties is changed due to issue in influxdb-java.
  * Under OkHttp3, influxdb-java sends "Authorization: encode(null:null"
  * Under new version of OkHttp, null username & password not leads illegal BasicAuth configuration but throws NullPointer exception.
  * Anyway, if user don't use auth, nothing affected I think.

This issue fixed in https://github.com/influxdata/influxdb-java/pull/644/files#diff-23360835991a654afd56314b41590521L150-R155, but not released yet.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 20, 2020
@wilkinsona
Copy link
Member

Thanks for the PR, but this has already been considered and rejected.

@wilkinsona wilkinsona closed this Mar 20, 2020
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 20, 2020
@kazuki-ma
Copy link
Author

Oh, sorry i don't find it. I understand your concern. I seek forward to upgrade it (and spring boot 3.x!)

@kazuki-ma kazuki-ma deleted the okhttp-4.4.1 branch March 20, 2020 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants