Skip to content

Commit

Permalink
Merge pull request #11572 from ihostage/scalafmt-2.4.x-step2
Browse files Browse the repository at this point in the history
Fix comments after bumping Scalafmt to `2.4.2`
  • Loading branch information
mkurz committed Dec 19, 2022
2 parents 5edaa77 + eed2d80 commit 97df2e2
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
7b6f6e6ebf7ca2cb4de903e9590872ec9b16aeb8
# Upgrade Scalafmt to 2.4.x
33eee4309ab453f6fd90c929378c7b87444cadc3
7b5c1ba370cb8e4779247de639905323271d839e
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ class GuiceInjectorBuilderSpec extends Specification {
.disable[GuiceInjectorBuilderSpec.JavaEnvironmentModule]
.disable(
classOf[GuiceInjectorBuilderSpec.AModule],
classOf[GuiceInjectorBuilderSpec.CModule]
) // C won't be disabled
classOf[GuiceInjectorBuilderSpec.CModule] // C won't be disabled
)
.injector()

injector.instanceOf[Environment] must throwA[com.google.inject.ConfigurationException]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,8 @@ trait JavaResultsHandlingSpec
.sendJson(
objectNode,
false,
Optional.of("file.txt")
) // even though the extension is txt, the content-type is json
Optional.of("file.txt") // even though the extension is txt, the content-type is json
)
}
}) { response =>
// Use starts with because there is also the charset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ class ScalaResultsSpec extends PlaySpecification {

"bake cookies should not depends on global state" in withApplication("play.allowGlobalApplication" -> false) {
implicit app =>
Ok.bakeCookies(cookieHeaderEncoding, sessionBaker, flashBaker) must not(
beNull
) // we are interested just that it executes without global state
Ok.bakeCookies(cookieHeaderEncoding, sessionBaker, flashBaker) must
not(beNull) // we are interested just that it executes without global state
}

"support a custom application context" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,8 @@ trait AssetsSpec extends PlaySpecification with WsTestClient with ServerIntegrat
client
.url("/encoding.js")
.addHttpHeaders(
ACCEPT_ENCODING -> "gzip, deflate, sdch, br, bz2"
) // even with a space, like chrome does it
ACCEPT_ENCODING -> "gzip, deflate, sdch, br, bz2" // even with a space, like chrome does it
)
// something is wrong here... if we just have "gzip, deflate, sdch, br", the "br" does not end up in the ACCEPT_ENCODING header
// .withHeaders(ACCEPT_ENCODING -> "gzip, deflate, sdch, br")
.get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class MaxLengthBodyParserSpec extends Specification with AfterAll with MustMatch
(
new BodyParser.Json(15, defaultHttpErrorHandler),
Some("application/json"),
ByteString("""{ "x": "15 b" }""")
), // 15 bytes
ByteString("""{ "x": "15 b" }""") // 15 bytes
),
(new BodyParser.TolerantJson(15, defaultHttpErrorHandler), None, ByteString("""{ "x": "15 b" }""")), // 15 bytes
(new BodyParser.FormUrlEncoded(15, defaultHttpErrorHandler), Some("application/x-www-form-urlencoded"), Body15),
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@ class CSRFAction(
}
}))
.splitWhen(_ => false)
.prefixAndTail(
0
) // TODO rewrite BodyHandler such that it emits sub-source then we can avoid all these dancing around
// TODO rewrite BodyHandler such that it emits sub-source then we can avoid all these dancing around
.prefixAndTail(0)
.map(_._2)
.concatSubstreams
.toMat(Sink.head[Source[ByteString, _]])(Keep.right)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,10 @@ private[openid] object Discovery {
.orElse(delegateRegex.findFirstIn(response.body))
.flatMap(extractHref(_))
OpenIDServer(
"http://specs.openid.net/auth/2.0/signon",
"http://specs.openid.net/auth/2.0/signon", // protocol version due to https://openid.net/specs/openid-authentication-2_0.html#html_disco
url,
delegate
) //protocol version due to http://openid.net/specs/openid-authentication-2_0.html#html_disco
)
})
}

Expand Down

0 comments on commit 97df2e2

Please sign in to comment.