Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for NoSuchElementException (0.21 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

        try {
          while (true) {
            val event = takeEvent()
            if (eventClass.isInstance(event)) {
              return eventClass.cast(event)
            }
          }
        } catch (e: NoSuchElementException) {
          throw AssertionError("full event sequence: $fullEventSequence", e)
        }
      }
    
      /**
       * Remove and return the next event from the recorded sequence.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

          val certificates = certificateFactory.generateCertificates(Buffer().write(data).inputStream())
          return certificates.single() as X509Certificate
        } catch (e: NoSuchElementException) {
          throw IllegalArgumentException("failed to decode certificate", e)
        } catch (e: IllegalArgumentException) {
          throw IllegalArgumentException("failed to decode certificate", e)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        dns.assertRequests(uriHost)
        assertThat(selection.hasNext()).isFalse()
        assertFailsWith<NoSuchElementException> {
          selection.next()
        }
        assertThat(routeSelector.hasNext()).isFalse()
        assertFailsWith<NoSuchElementException> {
          routeSelector.next()
        }
      }
    
      @Test fun singleRouteReturnsFailedRoute() {
        val address = factory.newAddress()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

    import java.io.IOException
    import java.net.InetAddress
    import java.net.InetSocketAddress
    import java.net.Proxy
    import java.net.SocketException
    import java.net.UnknownHostException
    import java.util.NoSuchElementException
    import okhttp3.Address
    import okhttp3.HttpUrl
    import okhttp3.Route
    import okhttp3.internal.canParseAsIpAddress
    import okhttp3.internal.immutableListOf
    import okhttp3.internal.toImmutableList
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/Certificates.kt

        val certificates =
          certificateFactory
            .generateCertificates(
              Buffer().writeUtf8(this).inputStream(),
            )
    
        return certificates.single() as X509Certificate
      } catch (nsee: NoSuchElementException) {
        throw IllegalArgumentException("failed to decode certificate", nsee)
      } catch (iae: IllegalArgumentException) {
        throw IllegalArgumentException("failed to decode certificate", iae)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (2)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

        try {
          while (true) {
            val event = takeEvent()
            if (eventClass.isInstance(event)) {
              return eventClass.cast(event)
            }
          }
        } catch (e: NoSuchElementException) {
          throw AssertionError("full event sequence: $fullEventSequence", e)
        }
      }
    
      inline fun <reified T : CallEvent> removeUpToEvent(): T = removeUpToEvent(T::class.java)
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/Cache.kt

                // has disappeared! Skip it.
              }
            }
    
            return false
          }
    
          override fun next(): String {
            if (!hasNext()) throw NoSuchElementException()
            val result = nextUrl!!
            nextUrl = null
            canRemove = true
            return result
          }
    
          override fun remove() {
            check(canRemove) { "remove() before next()" }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  8. docs/changelogs/changelog_3x.md

    ## Version 3.14.2
    
    _2019-05-19_
    
     *  Fix: Lock in a route when recovering from an HTTP/2 connection error. We had a bug where two
        calls that failed at the same time could cause OkHttp to crash with a `NoSuchElementException`
        instead of the expected `IOException`.
    
     *  Fix: Don't crash with a `NullPointerException` when formatting an error message describing a
        truncated response from an HTTPS proxy.
    
    
    ## Version 3.14.1
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertThat(response1.body.string()).isEqualTo("ABC")
        val cacheEntry =
          fileSystem.allPaths.stream()
            .filter { e: Path -> e.name.endsWith(".0") }
            .findFirst()
            .orElseThrow { NoSuchElementException() }
        corruptCertificate(cacheEntry)
        val response2 = client.newCall(request).execute() // Not Cached!
        assertThat(response2.body.string()).isEqualTo("DEF")
        assertThat(cache.requestCount()).isEqualTo(2)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

                return true
              }
            }
    
            return false
          }
    
          override fun next(): Snapshot {
            if (!hasNext()) throw NoSuchElementException()
            removeSnapshot = nextSnapshot
            nextSnapshot = null
            return removeSnapshot!!
          }
    
          override fun remove() {
            val removeSnapshot = this.removeSnapshot
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
Back to top