Skip to content

Commit 38bbc9a

Browse files
authored
Merge pull request #1037 from scala-steward/update/2.2.x/patches
[2.2.x] Patch updates
2 parents 7e4c3e1 + fa2a3d5 commit 38bbc9a

File tree

20 files changed

+71
-68
lines changed

20 files changed

+71
-68
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33

44
# Scala Steward: Reformat with scalafmt 3.8.3
55
186674ddaa8e441a6361b4b677c666eb7bdb4aef
6+
7+
# Scala Steward: Reformat with scalafmt 3.9.7
8+
cdd452887453edc19f5c924c1baae9c9b81a9abe

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ rewrite.sortModifiers.order = [ "private", "protected", "final", "sealed", "abst
1111
spaces.inImportCurlyBraces = true # more idiomatic to include whitepsace in import x.{ yyy }
1212
trailingCommas = preserve
1313
newlines.afterCurlyLambda = preserve
14-
version = 3.9.6
14+
version = 3.9.7

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ lazy val commonSettings = Def.settings(
7272
licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0")),
7373
scalaVersion := scala213,
7474
crossScalaVersions := Seq(scala213, scala3),
75-
conflictWarning := {
75+
conflictWarning := {
7676
if (scalaBinaryVersion.value == "3") {
7777
ConflictWarning("warn", sbt.Level.Warn, false)
7878
} else {
@@ -106,7 +106,7 @@ lazy val shadedCommonSettings = Seq(
106106

107107
lazy val shadeAssemblySettings = commonSettings ++ shadedCommonSettings ++ Seq(
108108
assembly / assemblyOption ~= (_.withIncludeScala(false)),
109-
assembly / test := {},
109+
assembly / test := {},
110110
assembly / assemblyJarName := {
111111
CrossVersion.partialVersion(scalaVersion.value) match {
112112
case Some((epoch, major)) =>
@@ -167,10 +167,10 @@ lazy val `shaded-asynchttpclient` = project
167167
.settings(shadeAssemblySettings)
168168
.settings(
169169
libraryDependencies ++= asyncHttpClient,
170-
name := "shaded-asynchttpclient",
171-
assembly / logLevel := Level.Error,
170+
name := "shaded-asynchttpclient",
171+
assembly / logLevel := Level.Error,
172172
assembly / assemblyMergeStrategy := {
173-
val NettyPropertiesPath = "META-INF" + File.separator + "io.netty.versions.properties"
173+
val NettyPropertiesPath = "META-INF" + File.separator + "io.netty.versions.properties"
174174
val mergeStrategy: String => MergeStrategy = {
175175
case NettyPropertiesPath =>
176176
MergeStrategy.first

integration-tests/src/test/scala/play/api/libs/ws/ahc/JsonRequestSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class JsonRequestSpec extends Specification with AfterAll with JsonBodyWritables
4545
"set a json node" in {
4646
val jsValue = Json.obj("k1" -> JsString("v1"))
4747
val client = StandaloneAhcWSClient()
48-
val req = new StandaloneAhcWSRequest(client, "http://playframework.com/", null)
48+
val req = new StandaloneAhcWSRequest(client, "http://playframework.com/", null)
4949
.withBody(jsValue)
5050
.asInstanceOf[StandaloneAhcWSRequest]
5151
.buildRequest()
@@ -60,7 +60,7 @@ class JsonRequestSpec extends Specification with AfterAll with JsonBodyWritables
6060
implicit val jsonReadable = body(objectMapper)
6161
val jsonNode = objectMapper.readTree("""{"k1":"v1"}""")
6262
val client = StandaloneAhcWSClient()
63-
val req = new StandaloneAhcWSRequest(client, "http://playframework.com/", null)
63+
val req = new StandaloneAhcWSRequest(client, "http://playframework.com/", null)
6464
.withBody(jsonNode)
6565
.asInstanceOf[StandaloneAhcWSRequest]
6666
.buildRequest()

integration-tests/src/test/scala/play/api/libs/ws/ahc/XMLRequestSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class XMLRequestSpec extends Specification with AfterAll with MustMatchers {
5454

5555
val xml = XML.parser.loadString("<hello><test></test></hello>")
5656
val client = StandaloneAhcWSClient()
57-
val req = new StandaloneAhcWSRequest(client, "http://playframework.com/", null)
57+
val req = new StandaloneAhcWSRequest(client, "http://playframework.com/", null)
5858
.withBody(xml)
5959
.asInstanceOf[StandaloneAhcWSRequest]
6060
.buildRequest()

integration-tests/src/test/scala/play/libs/ws/ahc/AhcWSClientSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class AhcWSClientSpec(implicit val executionEnv: ExecutionEnv)
6464
}
6565

6666
"source successfully" in withClient() { client =>
67-
val future = client.url(s"http://localhost:$testServerPort").stream().asScala
67+
val future = client.url(s"http://localhost:$testServerPort").stream().asScala
6868
val result: Future[ByteString] = future.flatMap { (response: StandaloneWSResponse) =>
6969
response.getBodyAsSource.runWith(Sink.head[ByteString](), materializer).asScala
7070
}

integration-tests/src/test/scala/play/libs/ws/ahc/AhcWSRequestFilterSpec.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class AhcWSRequestFilterSpec(implicit val executionEnv: ExecutionEnv)
3636

3737
"work with one request filter" in withClient() { client =>
3838
import scala.jdk.CollectionConverters._
39-
val callList = new java.util.ArrayList[Integer]()
39+
val callList = new java.util.ArrayList[Integer]()
4040
val responseFuture =
4141
client
4242
.url(s"http://localhost:$testServerPort")
@@ -52,7 +52,7 @@ class AhcWSRequestFilterSpec(implicit val executionEnv: ExecutionEnv)
5252

5353
"stream with one request filter" in withClient() { client =>
5454
import scala.jdk.CollectionConverters._
55-
val callList = new java.util.ArrayList[Integer]()
55+
val callList = new java.util.ArrayList[Integer]()
5656
val responseFuture =
5757
client
5858
.url(s"http://localhost:$testServerPort")
@@ -68,7 +68,7 @@ class AhcWSRequestFilterSpec(implicit val executionEnv: ExecutionEnv)
6868

6969
"work with three request filter" in withClient() { client =>
7070
import scala.jdk.CollectionConverters._
71-
val callList = new java.util.ArrayList[Integer]()
71+
val callList = new java.util.ArrayList[Integer]()
7272
val responseFuture =
7373
client
7474
.url(s"http://localhost:$testServerPort")
@@ -86,7 +86,7 @@ class AhcWSRequestFilterSpec(implicit val executionEnv: ExecutionEnv)
8686

8787
"stream with three request filters" in withClient() { client =>
8888
import scala.jdk.CollectionConverters._
89-
val callList = new java.util.ArrayList[Integer]()
89+
val callList = new java.util.ArrayList[Integer]()
9090
val responseFuture =
9191
client
9292
.url(s"http://localhost:$testServerPort")
@@ -105,7 +105,7 @@ class AhcWSRequestFilterSpec(implicit val executionEnv: ExecutionEnv)
105105
"should allow filters to modify the request" in withClient() { client =>
106106
val appendedHeader = "X-Request-Id"
107107
val appendedHeaderValue = "someid"
108-
val responseFuture =
108+
val responseFuture =
109109
client
110110
.url(s"http://localhost:$testServerPort")
111111
.setRequestFilter(new HeaderAppendingFilter(appendedHeader, appendedHeaderValue))
@@ -122,7 +122,7 @@ class AhcWSRequestFilterSpec(implicit val executionEnv: ExecutionEnv)
122122
"allow filters to modify the streaming request" in withClient() { client =>
123123
val appendedHeader = "X-Request-Id"
124124
val appendedHeaderValue = "someid"
125-
val responseFuture =
125+
val responseFuture =
126126
client
127127
.url(s"http://localhost:$testServerPort")
128128
.setRequestFilter(new HeaderAppendingFilter(appendedHeader, appendedHeaderValue))

play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/AhcCurlRequestLogger.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ trait CurlFormat {
8686
b.append(s" --data '${quote(bodyString)}'")
8787
b.append(" \\\n")
8888
case EmptyBody => // Do nothing.
89-
case other =>
89+
case other =>
9090
throw new UnsupportedOperationException("Unsupported body type " + other.getClass)
9191
}
9292

play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSClient.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class StandaloneAhcWSClient @Inject() (asyncHttpClient: AsyncHttpClient)(implici
7474
private[ahc] def execute(
7575
request: Request
7676
): Future[StandaloneAhcWSResponse] = {
77-
val result = Promise[StandaloneAhcWSResponse]()
77+
val result = Promise[StandaloneAhcWSResponse]()
7878
val handler = new AsyncCompletionHandler[AHCResponse]() {
7979
override def onCompleted(response: AHCResponse): AHCResponse = {
8080
result.success(StandaloneAhcWSResponse(response))
@@ -163,7 +163,7 @@ class StandaloneAhcWSClient @Inject() (asyncHttpClient: AsyncHttpClient)(implici
163163
import scala.concurrent.ExecutionContext.Implicits.global
164164

165165
val limitedSource = bodyAsSource.limit(StandaloneAhcWSClient.elementLimit)
166-
val result = limitedSource
166+
val result = limitedSource
167167
.runFold(ByteString.createBuilder) { (acc, bs) =>
168168
acc.append(bs)
169169
}
@@ -217,7 +217,7 @@ object StandaloneAhcWSClient {
217217
)(implicit materializer: Materializer): StandaloneAhcWSClient = {
218218
val ahcConfig = new AhcConfigBuilder(config).build()
219219
val asyncHttpClient = new DefaultAsyncHttpClient(ahcConfig)
220-
val wsClient = new StandaloneAhcWSClient(
220+
val wsClient = new StandaloneAhcWSClient(
221221
httpCache
222222
.map { cache =>
223223
new CachingAsyncHttpClient(asyncHttpClient, cache)

play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequest.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ case class StandaloneAhcWSRequest(
317317
}
318318

319319
val (builderWithBody, updatedHeaders) = body match {
320-
case EmptyBody => (builder, this.headers)
320+
case EmptyBody => (builder, this.headers)
321321
case InMemoryBody(bytes) =>
322322
val ct: String = contentType.getOrElse("text/plain")
323323

@@ -333,7 +333,7 @@ case class StandaloneAhcWSRequest(
333333

334334
// extract the content type and the charset
335335
val charsetOption = Option(HttpUtils.extractContentTypeCharsetAttribute(ct))
336-
val charset = charsetOption
336+
val charset = charsetOption
337337
.getOrElse {
338338
StandardCharsets.UTF_8
339339
}
@@ -435,7 +435,7 @@ case class StandaloneAhcWSRequest(
435435
private[libs] def createProxy(wsProxyServer: WSProxyServer): AHCProxyServer = {
436436
val proxyBuilder = new AHCProxyServer.Builder(wsProxyServer.host, wsProxyServer.port)
437437
if (wsProxyServer.principal.isDefined) {
438-
val realmBuilder = new Realm.Builder(wsProxyServer.principal.orNull, wsProxyServer.password.orNull)
438+
val realmBuilder = new Realm.Builder(wsProxyServer.principal.orNull, wsProxyServer.password.orNull)
439439
val scheme: Realm.AuthScheme =
440440
wsProxyServer.protocol.getOrElse("http").toLowerCase(java.util.Locale.ENGLISH) match {
441441
case "http" | "https" => Realm.AuthScheme.BASIC

0 commit comments

Comments
 (0)