Skip to content

Commit b2f22c2

Browse files
authored
Revert "[4.x] Avoid exposing internal functions and properties (#8137)" (#8319)
This reverts commit 710bdc1.
1 parent 710bdc1 commit b2f22c2

File tree

12 files changed

+70
-78
lines changed

12 files changed

+70
-78
lines changed

mockwebserver/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3.mockwebserver
1817

1918
import java.util.concurrent.TimeUnit

mockwebserver/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1918
package okhttp3.mockwebserver
2019

2120
import java.io.Closeable

okcurl/src/main/kotlin/okhttp3/curl/Main.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import okhttp3.Protocol
3636
import okhttp3.Request
3737
import okhttp3.RequestBody.Companion.toRequestBody
3838
import okhttp3.curl.Main.Companion.NAME
39+
import okhttp3.internal.format
3940
import okhttp3.internal.http.StatusLine
4041
import okhttp3.internal.http2.Http2
4142
import okhttp3.internal.platform.Platform
@@ -47,7 +48,6 @@ import picocli.CommandLine.Command
4748
import picocli.CommandLine.IVersionProvider
4849
import picocli.CommandLine.Option
4950
import picocli.CommandLine.Parameters
50-
import java.util.Locale
5151

5252
@Command(name = NAME, description = ["A curl for the next-generation web."],
5353
mixinStandardHelpOptions = true, versionProvider = Main.VersionProvider::class)
@@ -273,7 +273,7 @@ class Main : Runnable {
273273
level = Level.FINE
274274
formatter = object : SimpleFormatter() {
275275
override fun format(record: LogRecord): String {
276-
return "%s%n".format(Locale.US, record.message)
276+
return format("%s%n", record.message)
277277
}
278278
}
279279
})
@@ -289,9 +289,9 @@ class Main : Runnable {
289289
override fun format(record: LogRecord): String {
290290
val parameters = record.parameters
291291
if (parameters != null) {
292-
return "%s%n%s%n".format(Locale.US, record.message, record.parameters.first())
292+
return format("%s%n%s%n", record.message, record.parameters.first())
293293
} else {
294-
return "%s%n".format(Locale.US, record.message)
294+
return format("%s%n", record.message)
295295
}
296296
}
297297
}

okhttp-sse/src/main/kotlin/okhttp3/internal/sse/RealEventSource.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3.internal.sse
1817

1918
import java.io.IOException

okhttp-sse/src/main/kotlin/okhttp3/internal/sse/ServerSentEventReader.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3.internal.sse
1817

1918
import java.io.IOException

okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3.tls
1817

1918
import java.security.SecureRandom

okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3.tls
1817

1918
import java.math.BigInteger

okhttp-tls/src/main/kotlin/okhttp3/tls/internal/InsecureExtendedTrustManager.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3.tls.internal
1817

1918
import java.net.Socket

okhttp-urlconnection/src/main/kotlin/okhttp3/JavaNetCookieJar.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
1716
package okhttp3
1817

1918
import java.io.IOException

0 commit comments

Comments
 (0)