Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 18 of 18 for buildIfSupported (0.13 seconds)

  1. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

              else -> false
            }
          } catch (e: NoClassDefFoundError) {
            false
          } catch (e: ClassNotFoundException) {
            false
          }
    
        fun buildIfSupported(): ConscryptPlatform? = if (isSupported) ConscryptPlatform() else null
    
        fun atLeastVersion(
          major: Int,
          minor: Int = 0,
          patch: Int = 0,
        ): Boolean {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  2. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

            return null
          } else {
            return method.invoke(this, *callArgs)
          }
        }
      }
    
      companion object {
        fun buildIfSupported(): Platform? {
          val jvmVersion = System.getProperty("java.specification.version", "unknown")
          try {
            // 1.8, 9, 10, 11, 12 etc
            val version = jvmVersion.toInt()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  3. 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) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu May 22 14:39:30 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  4. 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()
        }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jul 28 07:33:49 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  5. 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.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 3.7K bytes
    - Click Count (0)
  6. okhttp/src/jvmMain/kotlin/okhttp3/internal/graal/GraalSvm.kt

    @TargetClass(OpenJSSEPlatform::class)
    @Delete
    class TargetOpenJSSEPlatform
    
    @TargetClass(Platform.Companion::class)
    class TargetPlatform {
      @Substitute
      fun findPlatform(): Platform = Jdk9Platform.buildIfSupported()!!
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.5K bytes
    - Click Count (0)
  7. android-test/src/test/kotlin/okhttp/android/test/AndroidSocketAdapterTest.kt

          listOfNotNull(
            DeferredSocketAdapter(ConscryptSocketAdapter.factory),
            DeferredSocketAdapter(AndroidSocketAdapter.factory("org.conscrypt")),
            StandardAndroidSocketAdapter.buildIfSupported("org.conscrypt"),
          )
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.6K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/ConscryptTest.kt

    //    assertThat(it.handshake()!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
          }
        }
      }
    
      @Test
      fun testBuildIfSupported() {
        val actual = ConscryptPlatform.buildIfSupported()
        assertThat(actual).isNotNull()
      }
    
      @Test
      fun testVersion() {
        val version = Conscrypt.version()
    
        assertTrue(ConscryptPlatform.atLeastVersion(1, 4, 9))
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 3.1K bytes
    - Click Count (0)
Back to Top