Skip to content

Commit

Permalink
Spotless bump (#8205)
Browse files Browse the repository at this point in the history
* Update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.24.0
* Spotless bump

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
yschimke and renovate[bot] committed Jan 20, 2024
1 parent a990f78 commit 5163d93
Show file tree
Hide file tree
Showing 23 changed files with 104 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,8 @@ class OkHttpTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.build()
server.useHttps(handshakeCertificates.sslSocketFactory())
Expand Down
4 changes: 3 additions & 1 deletion buildSrc/src/main/kotlin/Osgi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ private fun Project.applyOsgi(
val jarTask = tasks.getByName<Jar>(jarTaskName)
val bundleExtension =
jarTask.extensions.findByType() ?: jarTask.extensions.create(
BundleTaskExtension.NAME, BundleTaskExtension::class.java, jarTask,
BundleTaskExtension.NAME,
BundleTaskExtension::class.java,
jarTask,
)
bundleExtension.run {
setClasspath(osgi.compileClasspath + sourceSets["main"].compileClasspath)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", ve
gradlePlugin-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "org-jetbrains-kotlin" }
gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.27.0"
gradlePlugin-shadow = "gradle.plugin.com.github.johnrengelman:shadow:8.0.0"
gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.23.3"
gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.24.0"
guava-jre = "com.google.guava:guava:32.1.3-jre"
hamcrestLibrary = "org.hamcrest:hamcrest-library:2.2"
httpClient5 = "org.apache.httpcomponents.client5:httpclient5:5.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ class MockWebServer : Closeable {
}
socket =
sslSocketFactory!!.createSocket(
raw, raw.inetAddress.hostAddress, raw.port, true,
raw,
raw.inetAddress.hostAddress,
raw.port,
true,
)
val sslSocket = socket as SSLSocket
sslSocket.useClientMode = false
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ class ConnectionSpec internal constructor(

if (cipherSuitesAsString != null &&
!cipherSuitesAsString.hasIntersection(
socket.enabledCipherSuites, CipherSuite.ORDER_BY_NAME,
socket.enabledCipherSuites,
CipherSuite.ORDER_BY_NAME,
)
) {
return false
Expand Down
8 changes: 6 additions & 2 deletions okhttp/src/main/kotlin/okhttp3/Dispatcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ class Dispatcher() {
if (executorServiceOrNull == null) {
executorServiceOrNull =
ThreadPoolExecutor(
0, Int.MAX_VALUE, 60, TimeUnit.SECONDS,
SynchronousQueue(), threadFactory("$okHttpName Dispatcher", false),
0,
Int.MAX_VALUE,
60,
TimeUnit.SECONDS,
SynchronousQueue(),
threadFactory("$okHttpName Dispatcher", false),
)
}
return executorServiceOrNull!!
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ class CacheCorruptionTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(nullHostnameVerifier)
.build()
Expand Down
15 changes: 10 additions & 5 deletions okhttp/src/test/java/okhttp3/CacheTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ class CacheTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(NULL_HOSTNAME_VERIFIER)
.build()
Expand Down Expand Up @@ -372,7 +373,8 @@ class CacheTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(NULL_HOSTNAME_VERIFIER)
.build()
Expand Down Expand Up @@ -499,7 +501,8 @@ class CacheTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(NULL_HOSTNAME_VERIFIER)
.build()
Expand Down Expand Up @@ -553,7 +556,8 @@ class CacheTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(NULL_HOSTNAME_VERIFIER)
.build()
Expand Down Expand Up @@ -2396,7 +2400,8 @@ class CacheTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(NULL_HOSTNAME_VERIFIER)
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/CallHandshakeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class CallHandshakeTest {
client =
clientTestRule.newClientBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/CallKotlinTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ class CallKotlinTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.build()
server.useHttps(handshakeCertificates.sslSocketFactory())
Expand Down
12 changes: 8 additions & 4 deletions okhttp/src/test/java/okhttp3/CallTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,8 @@ open class CallTest {
client =
client.newBuilder()
.sslSocketFactory(
clientSocketFactory, handshakeCertificates.trustManager,
clientSocketFactory,
handshakeCertificates.trustManager,
) // Attempt RESTRICTED_TLS then fall back to MODERN_TLS.
.connectionSpecs(listOf(ConnectionSpec.RESTRICTED_TLS, ConnectionSpec.MODERN_TLS))
.hostnameVerifier(RecordingHostnameVerifier())
Expand Down Expand Up @@ -4157,7 +4158,8 @@ open class CallTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.proxy(server.toProxyAddress())
Expand Down Expand Up @@ -4309,7 +4311,8 @@ open class CallTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.protocols(listOf(Protocol.HTTP_1_1))
Expand Down Expand Up @@ -4619,7 +4622,8 @@ open class CallTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ class ConnectionCoalescingTest {
.fastFallback(false) // Avoid data races.
.dns(dns)
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.build()
val serverHandshakeCertificates =
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ open class ConnectionListenerTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/DuplexTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ class DuplexTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/EventListenerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,8 @@ class EventListenerTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/JSSETest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ class JSSETest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.build()
server.useHttps(handshakeCertificates.sslSocketFactory())
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/OpenJSSETest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ class OpenJSSETest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.build()
server.useHttps(handshakeCertificates.sslSocketFactory())
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/RouteFailureTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ class RouteFailureTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.hostnameVerifier(RecordingHostnameVerifier())
.build()
Expand Down
3 changes: 2 additions & 1 deletion okhttp/src/test/java/okhttp3/SessionReuseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ class SessionReuseTest {
client =
client.newBuilder()
.sslSocketFactory(
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
handshakeCertificates.sslSocketFactory(),
handshakeCertificates.trustManager,
)
.build()
server.useHttps(handshakeCertificates.sslSocketFactory())
Expand Down
Loading

0 comments on commit 5163d93

Please sign in to comment.