Skip to content

Commit 59a9508

Browse files
authored
Merge pull request #1050 from playframework/update/patches
Patch updates
2 parents 3aa1dd1 + f22ece4 commit 59a9508

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.git-blame-ignore-revs

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

1010
# Scala Steward: Reformat with scalafmt 3.7.17
1111
07656d26503cb1f6037231eef6fb742961e23d95
12+
13+
# Scala Steward: Reformat with scalafmt 3.8.2
14+
aea577073fb21a3abae14915dc7c556e13592c16

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.8.1
1+
version = 3.8.2
22
runner.dialect = Scala213Source3
33

44
align.preset = true

play-json/jvm/src/test/scala-3/play/api/libs/json/JsonMemoryFootprintSpec.scala

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ class JsonMemoryFootprintSpec extends AnyFreeSpec {
1313

1414
"Json.parse" - {
1515
"obj0" in assertSizes("""{}""", 16, 16)
16-
"obj1" in assertSizes("""{"1":true}""", 152, 168, expectedJdk21 = Some(160), hashedJdk21 = Some(184))
17-
"obj4" in assertSizes("""{"1":true,"2":true,"3":true,"4":true}""", 296, 312, expectedJdk21 = Some(304), hashedJdk21 = Some(328))
16+
"obj1" in assertSizes("""{"1":true}""", 152, 168, expectedJdk21 = Some(160), hashedJdk21 = Some(184))
17+
"obj4" in assertSizes(
18+
"""{"1":true,"2":true,"3":true,"4":true}""",
19+
296,
20+
312,
21+
expectedJdk21 = Some(304),
22+
hashedJdk21 = Some(328)
23+
)
1824

1925
"arr0" in assertSizes("""[]""", 40, 40)
2026
"arr1" in assertSizes("""[true]""", 120, 120)
@@ -45,13 +51,19 @@ class JsonMemoryFootprintSpec extends AnyFreeSpec {
4551
def arr1KB(elem: String, targetSize: Int = 1000): String =
4652
Iterator.continually(elem).take(targetSize / (elem.length + 1)).mkString("[", ",", "]")
4753
"obj0" in assertSizes(arr1KB("{}"), 7432, 7432)
48-
"obj1" in assertSizes(arr1KB("""{"a":6}"""), 29568, 31568, expectedJdk21 = Some(30568), hashedJdk21 = Some(33568))
54+
"obj1" in assertSizes(arr1KB("""{"a":6}"""), 29568, 31568, expectedJdk21 = Some(30568), hashedJdk21 = Some(33568))
4955
"nums" in assertSizes(arr1KB("6"), 42104, 42104)
5056
"arr0" in assertSizes(arr1KB("[]"), 15424, 15424)
5157
"arr1" in assertSizes(arr1KB("[6]"), 51080, 51080)
5258
}
5359

54-
private def assertSizes(input: String, expected: Long, hashed: Long, expectedJdk21: Option[Long] = None, hashedJdk21: Option[Long] = None) = {
60+
private def assertSizes(
61+
input: String,
62+
expected: Long,
63+
hashed: Long,
64+
expectedJdk21: Option[Long] = None,
65+
hashedJdk21: Option[Long] = None
66+
) = {
5567
assertSize(Json.parse(input), expected, expectedJdk21)
5668
withClue("After hashCode():")(
5769
assertSize(

0 commit comments

Comments
 (0)