Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 18 for buildIfSupported (0.25 seconds)

  1. 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
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 2K bytes
    - Click Count (0)
  2. 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()
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 1.5K bytes
    - Click Count (0)
  3. 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>,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Jan 10 09:36:53 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  4. 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),
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Jul 20 11:25:50 GMT 2025
    - 4.5K bytes
    - Click Count (0)
  5. 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
    
        @androidx.annotation.ChecksSdkIntAtLeast(api = 29)
        fun isSupported() = isAndroid && Build.VERSION.SDK_INT >= 29
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Jan 10 09:36:53 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  6. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt

            true
          } catch (_: ClassNotFoundException) {
            false
          }
    
        fun buildIfSupported(): BouncyCastlePlatform? = if (isSupported) BouncyCastlePlatform() else null
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  7. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/AndroidCertificateChainCleaner.kt

          other.trustManager === this.trustManager
    
      override fun hashCode(): Int = System.identityHashCode(trustManager)
    
      companion object {
        @SuppressSignatureCheck
        fun buildIfSupported(trustManager: X509TrustManager): AndroidCertificateChainCleaner? {
          val extensions =
            try {
              X509TrustManagerExtensions(trustManager)
            } catch (iae: IllegalArgumentException) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 2.7K bytes
    - Click Count (0)
  8. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt

            Class.forName("org.openjsse.net.ssl.OpenJSSE", false, OpenJSSEPlatform::class.java.classLoader)
    
            true
          } catch (_: ClassNotFoundException) {
            false
          }
    
        fun buildIfSupported(): OpenJSSEPlatform? = if (isSupported) OpenJSSEPlatform() else null
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 3.6K bytes
    - Click Count (0)
  9. 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),
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Oct 10 05:19:46 GMT 2025
    - 6.5K bytes
    - Click Count (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Jdk9Platform.kt

                SSLSocket::class.java.getMethod("getApplicationProtocol")
                true
              } catch (nsme: NoSuchMethodException) {
                false
              }
            }
        }
    
        fun buildIfSupported(): Jdk9Platform? = if (isAvailable) Jdk9Platform() else null
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 3.6K bytes
    - Click Count (0)
Back to Top