Skip to content

Commit

Permalink
Revert "[4.x] Avoid exposing internal functions and properties (#8137)…
Browse files Browse the repository at this point in the history
…" (#8319)

This reverts commit 710bdc1.
  • Loading branch information
swankjesse committed Apr 1, 2024
1 parent 710bdc1 commit b2f22c2
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.mockwebserver

import java.util.concurrent.TimeUnit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.mockwebserver

import java.io.Closeable
Expand Down
8 changes: 4 additions & 4 deletions okcurl/src/main/kotlin/okhttp3/curl/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import okhttp3.Protocol
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.curl.Main.Companion.NAME
import okhttp3.internal.format
import okhttp3.internal.http.StatusLine
import okhttp3.internal.http2.Http2
import okhttp3.internal.platform.Platform
Expand All @@ -47,7 +48,6 @@ import picocli.CommandLine.Command
import picocli.CommandLine.IVersionProvider
import picocli.CommandLine.Option
import picocli.CommandLine.Parameters
import java.util.Locale

@Command(name = NAME, description = ["A curl for the next-generation web."],
mixinStandardHelpOptions = true, versionProvider = Main.VersionProvider::class)
Expand Down Expand Up @@ -273,7 +273,7 @@ class Main : Runnable {
level = Level.FINE
formatter = object : SimpleFormatter() {
override fun format(record: LogRecord): String {
return "%s%n".format(Locale.US, record.message)
return format("%s%n", record.message)
}
}
})
Expand All @@ -289,9 +289,9 @@ class Main : Runnable {
override fun format(record: LogRecord): String {
val parameters = record.parameters
if (parameters != null) {
return "%s%n%s%n".format(Locale.US, record.message, record.parameters.first())
return format("%s%n%s%n", record.message, record.parameters.first())
} else {
return "%s%n".format(Locale.US, record.message)
return format("%s%n", record.message)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.internal.sse

import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.internal.sse

import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.tls

import java.security.SecureRandom
Expand Down
1 change: 0 additions & 1 deletion okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.tls

import java.math.BigInteger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3.tls.internal

import java.net.Socket
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package okhttp3

import java.io.IOException
Expand Down

0 comments on commit b2f22c2

Please sign in to comment.