Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for firstOrNull (0.08 sec)

  1. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/sources/SourcesRepository.kt

         */
        fun sourceFileAndSourceRootFor(sourceFilePath: String): Pair<File, File> =
            sourceRoots.asSequence()
                .map { it.resolve(sourceFilePath) to it }
                .firstOrNull { it.first.isFile }
                ?: error("Source file '$sourceFilePath' not found, searched in source roots:\n  - ${sourceRoots.joinToString("\n  - ")}")
    
        private
        val KtFile.normalizedPath: String?
    Registered: Wed Dec 31 11:36:14 UTC 2025
    - Last Modified: Mon Apr 28 14:56:52 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  2. .teamcity/src/main/kotlin/model/PerformanceTestBucketProvider.kt

                        .mapNotNull {
                            it.getOrDefault(scenario.testProject, emptyList()).firstOrNull { duration ->
                                duration.scenario ==
                                    scenario.scenario
                            }
                        }.firstOrNull()
                        // Fallback for new performance tests (don't use 0 to avoid division by zero)
    Registered: Wed Dec 31 11:36:14 UTC 2025
    - Last Modified: Thu Jul 10 02:18:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  3. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Iana.kt

      return SuiteId(id, matcher.groupValues[3])
    }
    
    class IanaSuites(
      val name: String,
      val suites: List<SuiteId>,
    ) {
      fun fromJavaName(javaName: String): SuiteId =
        suites.firstOrNull {
          it.name == javaName || it.name == "TLS_${javaName.drop(4)}"
        } ?: throw IllegalArgumentException("No such suite: $javaName")
    }
    
    suspend fun fetchIanaSuites(okHttpClient: OkHttpClient): IanaSuites {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/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.
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

        return OkHttpDebugLogging.enable(
          "javax.net.ssl",
          object : Handler() {
            override fun publish(record: LogRecord) {
              val param = record.parameters?.firstOrNull() as? String
              debugHandler(JsseDebugMessage(record.message, param))
            }
    
            override fun flush() {
            }
    
            override fun close() {
            }
          },
        )
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  6. build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/tasks/UpdateAgpVersions.kt

            Jsoup.connect(buildToolsUrl)
                .get()
                .select("section:has(> h3#kts)")
                .first()
                ?.text()
                ?.lines()
                ?.firstOrNull { it.contains("buildToolsVersion = ") }
                ?.substringAfter("buildToolsVersion = ")
                ?.trim('"', ' ')
                ?: error("Couldn't find buildToolsVersion on $buildToolsUrl")
    
    Registered: Wed Dec 31 11:36:14 UTC 2025
    - Last Modified: Fri Oct 24 09:10:29 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt

          assertThat(messages).contains(failure!!.message)
        }
    
      fun assertFailureMatches(vararg patterns: String) =
        apply {
          val message = failure!!.message!!
          assertThat(
            patterns.firstOrNull { pattern ->
              message.matches(pattern.toRegex())
            },
          ).isNotNull()
        }
    
      fun assertSentRequestAtMillis(
        minimum: Long,
        maximum: Long,
      ) = apply {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/codegen/ApiExtensionGeneratorFacade.kt

            .sortedWithTypeOfTakingFunctionsFirst()
            .flatMap { function ->
    
                val candidateFor = object {
    
                    val groovyNamedArgumentsToVarargs =
                        function.parameters.firstOrNull()?.type?.isGroovyNamedArgumentMap == true
    
                    val javaClassToKotlinClass =
                        function.parameters.any { it.type.hasJavaClass() }
    
                    val extension
    Registered: Wed Dec 31 11:36:14 UTC 2025
    - Last Modified: Wed Mar 12 15:56:18 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/RecordedRequest.kt

        replaceWith = ReplaceWith("body.readUtf8()"),
        level = DeprecationLevel.WARNING,
      )
      fun getUtf8Body(): String = body.readUtf8()
    
      fun getHeader(name: String): String? = headers.values(name).firstOrNull()
    
      override fun toString(): String = requestLine
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/tasks/AbstractCheckOrUpdateContributorsInReleaseNotes.kt

                error("Can't find the contributors section in the release notes $releaseNotes.")
            }
    
            val contributorSectionEndIndex = (contributorSectionBeginIndex until releaseNotesLines.size).firstOrNull {
                val line = releaseNotesLines[it].trim()
                line.isNotEmpty() && !line.startsWith("[")
            } ?: error("Can't find the contributors section end in the release notes $releaseNotes.")
    Registered: Wed Dec 31 11:36:14 UTC 2025
    - Last Modified: Tue Jun 24 07:54:08 UTC 2025
    - 5.7K bytes
    - Viewed (0)
Back to top