Conversation
…iders() We want to avoid this call because it can lead to unwanted side-effects, such as initialization of java-util-logging on IBM JDKs that bundle the IBMSASL provider. The only reason for this call is to check for the Conscrypt module, which is only available on Android and is not applicable to how the tracer uses OkHttp. Patched class is based on https://raw.githubusercontent.com/DataDog/okhttp/tags/parent-3.12.15/okhttp/src/main/java/okhttp3/internal/platform/Platform.java with the following sections of code removed: ``` public static boolean isConscryptPreferred() { // mainly to allow tests to run cleanly if ("conscrypt".equals(System.getProperty("okhttp.platform"))) { return true; } // check if Provider manually installed String preferredProvider = Security.getProviders()[0].getName(); return "Conscrypt".equals(preferredProvider); } ``` ``` if (isConscryptPreferred()) { Platform conscrypt = ConscryptPlatform.buildIfSupported(); if (conscrypt != null) { return conscrypt; } } ```
|
Adding Bruce as second reviewer, since I need review from someone with write access |
PerfectSlayer
left a comment
There was a problem hiding this comment.
Looking good.
To be clear, we are patching this upstrean (in our fork) and do no longer use the relocate from the dd-trace-java communication module?
For the short-term we are keeping the patch in Once we are comfortable about doing a new release of our OkHttp fork (or need to do a release for a different reason) we can replace the patch with a proper release. That's why I want to have the patched code in this fork, even if we're not doing a release yet - otherwise we risk forgetting to apply it when we actually do a new release... |
|
I'd like to add that the CI not anymore running on this project. |
We want to avoid this call because it can lead to unwanted side-effects, such as initialization of java-util-logging on IBM JDKs that bundle the IBMSASL provider. The only reason for this call is to check for the Conscrypt module, which is only available on Android and is not applicable to how the tracer uses OkHttp.
Patched class is based on https://raw.githubusercontent.com/DataDog/okhttp/tags/parent-3.12.15/okhttp/src/main/java/okhttp3/internal/platform/Platform.java with the following sections of code removed: