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

[Kotlin] Make ApiClient in jvm-retrofit2 be able to use own OkHttpClient #6855

Closed

Conversation

tgerth
Copy link
Contributor

@tgerth tgerth commented Jul 3, 2020

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.sh bin/configs/kotlin-jvm-retrofit2*.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

similar to PR: #6699

@auto-labeler
Copy link

auto-labeler bot commented Jul 3, 2020

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@wing328
Copy link
Member

wing328 commented Jul 5, 2020

cc @jimschubert (2017/09), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03)


private var okHttpClient?: OkHttpClient = null

constructor(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgerth we don't need a new constructor, you can add the private val okHttpClient : OkHttpClient? = null to the constructor at line 18, because it has a default value.
And with this change, you can remove this constructor, and the var in line 49.

@wing328
Copy link
Member

wing328 commented Jul 6, 2020

The commit history contains many changes (commits) not related to this PR. Better create a new PR by cherry-picking the commits related to Kotlin.

@tgerth tgerth closed this Jul 20, 2020
@tgerth tgerth deleted the kotlin-jvm-retrofit2-apiclient branch July 20, 2020 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants