Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for firstOrNull (0.17 sec)

  1. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

      @BeforeEach
      internal fun setUp() {
        val inetAddresses = InetAddress.getAllByName("localhost")
        localhostIpv4 = inetAddresses.firstOrNull { it is Inet4Address }
          ?: throw TestAbortedException()
        localhostIpv6 = inetAddresses.firstOrNull { it is Inet6Address }
          ?: throw TestAbortedException()
    
        serverIpv4 = MockWebServer()
        serverIpv4.start(localhostIpv4, 0) // Pick any available port.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

            val peekedHeader =
              reader.peekHeader()
                ?: throw ProtocolException("expected a value at $reader")
    
            val choice =
              choices.firstOrNull { it.matches(peekedHeader) }
                ?: throw ProtocolException(
                  "expected a matching choice but was $peekedHeader at $reader",
                )
    
            return choice to choice.fromDer(reader)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top