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

Convert Address to Kotlin #4787

Merged
merged 6 commits into from
Mar 26, 2019
Merged

Conversation

ShaishavGandhi
Copy link
Contributor

Resolves #4765
The build will fail right now since OkHttpClient doesn't recognize internal modifier on equalsNonHost. Will wait for #4748 for that.

Also made the properties private as advised in #4782.

Copy link
Member

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

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

Nice! Thanks!

Don't forget to submit the Square contributors’ agreement if you haven't already.

okhttp/src/main/java/okhttp3/Address.kt Outdated Show resolved Hide resolved
okhttp/src/main/java/okhttp3/Address.kt Show resolved Hide resolved
okhttp/src/main/java/okhttp3/Address.kt Outdated Show resolved Hide resolved
okhttp/src/main/java/okhttp3/Address.kt Outdated Show resolved Hide resolved
okhttp/src/main/java/okhttp3/Address.kt Show resolved Hide resolved
okhttp/src/main/java/okhttp3/Address.kt Outdated Show resolved Hide resolved
@swankjesse
Copy link
Member

Uh oh. The fix I’ve been using is to add a helper method to InternalKt.kt.

> Task :okhttp:compileJava
/home/travis/build/square/okhttp/okhttp/src/main/java/okhttp3/OkHttpClient.java:145: error: cannot find symbol
        return a.equalsNonHost(b);
                ^
  symbol:   method equalsNonHost(Address)
  location: variable a of type Address
Note: /home/travis/build/square/okhttp/okhttp/src/main/java/okhttp3/OkHttpClient.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

Copy link
Member

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

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

Needs a compile fix before it can be merged.

okhttp/build.gradle Outdated Show resolved Hide resolved
okhttp/src/main/java/okhttp3/Address.kt Show resolved Hide resolved
}

override fun toString(): String {
return buildString {
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

@swankjesse swankjesse merged commit 5d76a98 into square:master Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants