Skip to content

Commit

Permalink
Fix compile failure
Browse files Browse the repository at this point in the history
* Make equalsNonhost static in InternalKt
  • Loading branch information
ShaishavGandhi committed Mar 25, 2019
1 parent 41a6945 commit bacfcb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion okhttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
'okhttp3.Address#sslSocketFactory()',
'okhttp3.Address#url()',
'okhttp3.Address#socketFactory()',
'okhttp3.TlsVersion#javaName()',
'okhttp3.FormBody#encodedName(int)',
'okhttp3.FormBody#encodedValue(int)',
'okhttp3.FormBody#name(int)',
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/main/java/okhttp3/OkHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import okio.Source;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;

import static okhttp3.internal.InternalKtKt.addressEqualsNonHost;
import static okhttp3.internal.Util.checkDuration;

/**
Expand Down Expand Up @@ -134,7 +135,7 @@ public class OkHttpClient implements Cloneable, Call.Factory, WebSocket.Factory
}

@Override public boolean equalsNonHost(Address a, Address b) {
return a.equalsNonHost(b);
return addressEqualsNonHost(a, b);
}

@Override public int code(Response.Builder responseBuilder) {
Expand Down
3 changes: 3 additions & 0 deletions okhttp/src/main/java/okhttp3/internal/InternalKt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package okhttp3.internal

import okhttp3.Address
import okhttp3.Cookie
import okhttp3.Headers
import okhttp3.HttpUrl
Expand All @@ -30,3 +31,5 @@ fun addHeaderLenient(builder: Headers.Builder, line: String) =

fun addHeaderLenient(builder: Headers.Builder, name: String, value: String) =
builder.addLenient(name, value)

fun addressEqualsNonHost(thisAddress: Address, thatAddress: Address) = thisAddress.equalsNonHost(thatAddress)

0 comments on commit bacfcb2

Please sign in to comment.