- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for buildIfSupported (0.08 sec)
-
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt
val conscrypt = ConscryptPlatform.buildIfSupported() if (conscrypt != null) { return conscrypt } } if (isBouncyCastlePreferred) { val bc = BouncyCastlePlatform.buildIfSupported() if (bc != null) { return bc } } if (isOpenJSSEPreferred) { val openJSSE = OpenJSSEPlatform.buildIfSupported() if (openJSSE != null) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu May 22 14:39:30 UTC 2025 - 2.1K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt
val androidPlatform = Android10Platform.buildIfSupported() ?: AndroidPlatform.buildIfSupported() if (androidPlatform != null) return androidPlatform // If the API version is 0, assume this is the Android artifact, but running on the JVM without Robolectric. if (Build.VERSION.SDK_INT == 0) { return Jdk9Platform.buildIfSupported() ?: Platform() }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 07:33:49 UTC 2025 - 1.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/platform/Jdk9PlatformTest.kt
import okhttp3.internal.platform.Jdk9Platform.Companion.buildIfSupported import okhttp3.testing.PlatformRule import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.RegisterExtension class Jdk9PlatformTest { @RegisterExtension val platform = PlatformRule() @Test fun buildsWhenJdk9() { platform.assumeJdk9() assertThat(buildIfSupported()).isNotNull() } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/Android10Platform.kt
@SuppressSignatureCheck class Android10Platform : Platform(), ContextAwarePlatform { override var applicationContext: Context? = null private val socketAdapters = listOfNotNull( Android10SocketAdapter.buildIfSupported(), DeferredSocketAdapter(AndroidSocketAdapter.playProviderFactory), // Delay and Defer any initialisation of Conscrypt and BouncyCastle DeferredSocketAdapter(ConscryptSocketAdapter.factory),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Jul 20 11:25:50 UTC 2025 - 4.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt
assertThat(it.handshake!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3) } } @Test fun testBuildIfSupported() { val actual = OpenJSSEPlatform.buildIfSupported() assertThat(actual).isNotNull() } private fun enableTls() { // Generate a self-signed cert for the server to serve and the client to trust.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 3.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatformTest.kt
assumeTrue(System.getProperty("java.specification.version") == "1.8") platform.assumeJettyBootEnabled() assertThat(buildIfSupported()).isNotNull() } @Test fun testNotBuildWithOther() { assumeFalse(System.getProperty("java.specification.version") == "1.8") assertThat(buildIfSupported()).isNull() }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/StandardAndroidSocketAdapter.kt
/** * Base Android reflection based SocketAdapter for the built in Android SSLSocket. * * It's assumed to always be present with known class names on Android devices, so we build * optimistically via [buildIfSupported]. But it also doesn't assume a compile time API. */ class StandardAndroidSocketAdapter( sslSocketClass: Class<in SSLSocket>, private val sslSocketFactoryClass: Class<in SSLSocketFactory>,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.7K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/AndroidPlatform.kt
@SuppressSignatureCheck class AndroidPlatform : Platform(), ContextAwarePlatform { override var applicationContext: Context? = null private val socketAdapters = listOfNotNull( StandardAndroidSocketAdapter.buildIfSupported(), DeferredSocketAdapter(AndroidSocketAdapter.playProviderFactory), // Delay and Defer any initialisation of Conscrypt and BouncyCastle DeferredSocketAdapter(ConscryptSocketAdapter.factory),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu May 29 16:52:38 UTC 2025 - 6.5K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/Android10SocketAdapter.kt
throw IOException("Android internal error", iae) } } @SuppressSignatureCheck companion object { fun buildIfSupported(): SocketAdapter? = if (isSupported()) Android10SocketAdapter() else null fun isSupported() = isAndroid && Build.VERSION.SDK_INT >= 29 }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.8K bytes - Viewed (0) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt
Class.forName("org.bouncycastle.jsse.provider.BouncyCastleJsseProvider", false, javaClass.classLoader) true } catch (_: ClassNotFoundException) { false } fun buildIfSupported(): BouncyCastlePlatform? = if (isSupported) BouncyCastlePlatform() else null }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 3.3K bytes - Viewed (0)