Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for toRegex (0.06 sec)

  1. samples/guide/src/test/kotlin/okhttp3/AllMainsTest.kt

        return mainFiles
          .map {
            val suffix = it.path.replace("${prefix}samples/guide/src/main/java/", "")
            suffix
              .replace("(.*)\\.java".toRegex()) { mr ->
                mr.groupValues[1].replace('/', '.')
              }.replace("(.*)\\.kt".toRegex()) { mr ->
                mr.groupValues[1].replace('/', '.') + "Kt"
              }
          }.sorted()
      }
    }
    
    @Disabled("Don't run by default")
    @Tag("Slow")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  2. android-test/src/test/kotlin/okhttp/android/test/AndroidLoggingTest.kt

        }
    
        val logs = ShadowLog.getLogsForTag(AndroidPlatform.Tag)
        assertThat(logs.map { it.type }).containsOnly(Log.INFO)
        assertThat(
          logs.map {
            it.msg.replace(
              "\\d+".toRegex(),
              "",
            )
          },
        ).containsExactly(
          "--> GET http://google.com/robots.txt",
          "<-- HTTP FAILED: java.net.UnknownHostException: shortcircuit. ${request.url} (ms)",
        )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 21 14:27:04 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  3. buildSrc/src/main/kotlin/AlpnVersions.kt

      val version = System.getProperty("alpn.boot.version")
    
      if (version != null) {
        return version
      }
    
      val javaVersion = System.getProperty("java.version")
      val match = "1\\.8\\.0_(\\d+)(-.*)?".toRegex().find(javaVersion) ?: return null
    
      return alpnBootVersionForPatchVersion(match.groupValues.first().toInt())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt

        }
    
      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 {
        assertDateInRange(minimum, response!!.sentRequestAtMillis, maximum)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. .teamcity/src/main/kotlin/common/VersionedSettingsBranch.kt

            // experimental branch of gradle/gradle-promote
            private const val GRADLE_PROMOTE_EXPERIMENTAL_VCS_ROOT_ID = "Gradle_GradlePromoteExperimental"
    
            private val OLD_RELEASE_PATTERN = "release(\\d+)x".toRegex()
    
            fun fromDslContext(): VersionedSettingsBranch = VersionedSettingsBranch(DslContext.getParameter("branch"))
    
            private fun determineNightlyPromotionTriggerHour(branchName: String) =
    Registered: Wed Sep 10 11:36:15 UTC 2025
    - Last Modified: Tue Jun 17 09:57:45 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  6. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Iana.kt

    import okio.ByteString.Companion.decodeHex
    import okio.IOException
    
    /** Example: "0x00,0x08",TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,Y,N,[RFC4346] */
    val IANA_CSV_PATTERN = "\"0x(\\w\\w),0x(\\w\\w)\",(\\w+).*".toRegex()
    
    fun parseIanaCsvRow(s: String): SuiteId? {
      if (s.contains("Reserved") || s.contains("Unassigned")) return null
      val matcher = IANA_CSV_PATTERN.matchEntire(s) ?: return null
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2K bytes
    - Viewed (0)
  7. okhttp-osgi-tests/src/test/kotlin/okhttp3/osgi/OsgiTest.kt

        }
      }
    
      private fun RepositoryPlugin.deployClassPath() {
        val classpath = System.getProperty("java.class.path")
        val entries =
          classpath
            .split(File.pathSeparator.toRegex())
            .dropLastWhile { it.isEmpty() }
            .toTypedArray()
        for (classPathEntry in entries) {
          deployFile(classPathEntry.toPath())
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 5K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

            javaClass
              .getDeclaredField("masterSecret")
              .apply {
                isAccessible = true
              }.get(this) as? SecretKey
    
        val randomRegex = "\"random\"\\s+:\\s+\"([^\"]+)\"".toRegex()
    
        fun register() {
          // Enable JUL logging for SSL events, must be activated early or via -D option.
          System.setProperty("javax.net.debug", "")
          logger =
            Logger
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  9. okhttp/src/commonTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

          var publicSuffix = buffer.readUtf8LineStrict()
          if (publicSuffix.contains("*")) {
            // A wildcard rule, let's replace the wildcard with a value.
            publicSuffix = publicSuffix.replace("\\*".toRegex(), "square")
          }
          assertThat(publicSuffixDatabase.getEffectiveTldPlusOne(publicSuffix)).isNull()
          val test = "foobar.$publicSuffix"
          assertThat(publicSuffixDatabase.getEffectiveTldPlusOne(test)).isEqualTo(test)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 22:00:49 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  10. okhttp/build.gradle.kts

          allJvmArgs = allJvmArgs.filter { !it.startsWith("--add-opens") }
        }
        if (name.matches("test.*UnitTest".toRegex()) && javaLauncher.get().metadata.languageVersion.asInt() < 17) {
          // Work around robolectric requirements and limitations
          // https://github.com/robolectric/robolectric/issues/10419
          filter {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 03:59:03 UTC 2025
    - 9.4K bytes
    - Viewed (0)
Back to top