Ask questionsOkHttp 3.x fails with OpenJDK Zulu 8.0.252
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
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
Answer questions DanielThomas
Ah! It's the combination of the JDK 9 platform activation our internal mTLS wrapper that delegates to the underlying impl that's breaking this on our end - it doesn't implement those methods causing those calls to fall through to SslSocket and hit the UnsupportedOperationException. Guess we'll have to conditionally drop in the right wrapper depending on the method availability.
Guess u252 and upwards still needs a leg up on OkHttp 3 and 4 so the built-in ALPN support does activate there. Seems like OkHttp 3 will work by default, OkHttp 4 will not activate built-in ALPN support in this release.