question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OkHttp 3.x fails with OpenJDK Zulu 8.0.252

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:22

github_iconTop GitHub Comments

3reactions
yschimkecommented, Apr 21, 2020

Why would anyone do that???

    public String getApplicationProtocol() {
        throw new UnsupportedOperationException();
    }
1reaction
DanielThomascommented, Apr 24, 2020

Looks great! JDK 9 platform activates and the fallback for UnsupportedOperationException for our incompatible SslSocket wrapper successfully falls back to HTTP/1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSLException with latest Java Zulu 8.0.252 - Stack Overflow
This custom Trust Manager implements X509TrustManager class and returns ... To avoid this error, i have disabled TLS 1.3 support in Payara.
Read more >
Download Azul JDKs
Download Java Builds of OpenJDK 8, 11, 13, 15, 17, 19. Azul Zulu Builds of OpenJDK runs on Linux, Windows, macOS & Solaris...
Read more >
Past Agent Releases - AppDynamics Documentation
This release includes: Support for Red Hat OpenJDK 8. See Java Supported Environments and Object Instance Tracking for Java. Support for Apache Kafka...
Read more >
Solved: Re: InvokeHTTP randomly hangs - Cloudera Community
To update - the combination of NiFi 1.12.1 and OpenJDK 1.8u242 works fine - left it ... newTimeoutException(Http2Stream.java:593) at okhttp3.internal.http2.
Read more >
Azul Zulu OpenJDK 15 on the Raspberry Pi - Foojay
With the SDKMAN tool, you can get a list of available JDKs on your Raspberry Pi and switch to Java 15 with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found