okhttp: OkHttp 3.x fails with OpenJDK Zulu 8.0.252
Hi folks,
We found that this particular piece of code in okhttp 3.x: https://github.com/square/okhttp/blob/okhttp_3.14.x/okhttp/src/main/java/okhttp3/internal/platform/Jdk9Platform.java#L81-L94 breaks.
This checks for setApplicationProtocols
and getApplicationProtocol
which are JDK 9. however, these ones got backported to Zulu 8.0.252 causing OkHttp believing that is running on jdk9 and initializing a Jdk9Platform
which breaks projects
Wondering if a patch could be released for 3.x since there are several libraries and projects out there that haven’t migrated to 4.x
Thanks
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 22
Why would anyone do that???
Looks great! JDK 9 platform activates and the fallback for
UnsupportedOperationException
for our incompatible SslSocket wrapper successfully falls back to HTTP/1.Sure can - let us know where to pickup your snapshots and we’ll give it a try.
Our wrapper is fixed, we switched to a javaassist generated proxy, so we should be good to go there.
Here’s the upstream change https://hg.openjdk.java.net/jdk8u/jdk8u41/jdk/rev/b26b096d4c89
Full stack trace: