Skip to content

Commit 78b9b62

Browse files
Update scalafmt-core to 3.9.9 (#274)
* Update scalafmt-core to 3.9.9 * Reformat with scalafmt 3.9.9 Executed command: scalafmt --non-interactive * Add 'Reformat with scalafmt 3.9.9' to .git-blame-ignore-revs
1 parent 0e64e16 commit 78b9b62

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

.git-blame-ignore-revs

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

4040
# Scala Steward: Reformat with scalafmt 3.9.8
4141
5dbfede26b72e6f3b64d3fc6a635ab5707fb4316
42+
43+
# Scala Steward: Reformat with scalafmt 3.9.9
44+
b83264042216c7d83b73247b8b7a998902ec26d5

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
style = defaultWithAlign
22
maxColumn = 120
3-
version = 3.9.8
3+
version = 3.9.9
44
assumeStandardLibraryStripMargin = true
55
align.stripMargin = true
66
runner.dialect = scala3

modules/flink-1-api/src/main/scala-3/org/apache/flinkx/api/LowPrioImplicits.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ private[api] trait LowPrioImplicits extends TaggedDerivation[TypeInformation]:
3939
else
4040
new CaseClassSerializer[T & Product](
4141
clazz = clazz,
42-
scalaFieldSerializers = IArray.genericWrapArray(ctx.params.map { p =>
43-
val ser = p.typeclass.createSerializer(config)
44-
if (p.annotations.exists(_.isInstanceOf[nullable])) {
45-
NullableSerializer.wrapIfNullIsNotSupported(ser, true)
46-
} else ser
47-
}).toArray,
42+
scalaFieldSerializers = IArray
43+
.genericWrapArray(ctx.params.map { p =>
44+
val ser = p.typeclass.createSerializer(config)
45+
if (p.annotations.exists(_.isInstanceOf[nullable])) {
46+
NullableSerializer.wrapIfNullIsNotSupported(ser, true)
47+
} else ser
48+
})
49+
.toArray,
4850
isCaseClassImmutable = isCaseClassImmutable(clazz, ctx.params.map(_.label))
4951
)
5052
val ti = new ProductTypeInformation[T & Product](

modules/flink-1-api/src/test/scala/org/apache/flinkx/api/SerializerSnapshotTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class SerializerSnapshotTest extends AnyFlatSpec with Matchers {
157157
.readVersionedSnapshot[WithDefault](input, getClass.getClassLoader) // Flink always calls this
158158

159159
// Deserialize the old data with the new serializer
160-
val newSerializer = implicitly[TypeSerializer[WithDefault]]
160+
val newSerializer = implicitly[TypeSerializer[WithDefault]]
161161
val deserializedData = newSerializer.deserialize(input)
162162
deserializedData should be(expectedData)
163163

modules/flink-2-api/src/main/scala-3/org/apache/flinkx/api/LowPrioImplicits.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ private[api] trait LowPrioImplicits extends TaggedDerivation[TypeInformation]:
3939
else
4040
new CaseClassSerializer[T & Product](
4141
clazz = clazz,
42-
scalaFieldSerializers = IArray.genericWrapArray(ctx.params.map { p =>
43-
val ser = p.typeclass.createSerializer(config)
44-
if (p.annotations.exists(_.isInstanceOf[nullable])) {
45-
NullableSerializer.wrapIfNullIsNotSupported(ser, true)
46-
} else ser
47-
}).toArray,
42+
scalaFieldSerializers = IArray
43+
.genericWrapArray(ctx.params.map { p =>
44+
val ser = p.typeclass.createSerializer(config)
45+
if (p.annotations.exists(_.isInstanceOf[nullable])) {
46+
NullableSerializer.wrapIfNullIsNotSupported(ser, true)
47+
} else ser
48+
})
49+
.toArray,
4850
isCaseClassImmutable = isCaseClassImmutable(clazz, ctx.params.map(_.label))
4951
)
5052
val ti = new ProductTypeInformation[T & Product](

modules/flink-common-api/src/test/scala/org/apache/flinkx/api/serializer/CaseClassSerializerTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ class CaseClassSerializerTest extends AnyFlatSpec with Matchers {
9292
}
9393

9494
it should "copy the serialized stream" in {
95-
val serializer = new CaseClassSerializer[Immutable](classOf[Immutable], Array(StringSerializer.INSTANCE), true)
95+
val serializer = new CaseClassSerializer[Immutable](classOf[Immutable], Array(StringSerializer.INSTANCE), true)
9696
val outerSerializer = new CaseClassSerializer[OuterMutable](classOf[OuterMutable], Array(serializer), true)
97-
val expectedData = OuterMutable(Immutable("a"))
97+
val expectedData = OuterMutable(Immutable("a"))
9898

9999
val output = new DataOutputSerializer(1024)
100100
outerSerializer.serialize(expectedData, output)
101-
val input = new DataInputDeserializer(output.getSharedBuffer)
101+
val input = new DataInputDeserializer(output.getSharedBuffer)
102102
val newOutput = new DataOutputSerializer(1024)
103103
outerSerializer.copy(input, newOutput)
104-
val newInput = new DataInputDeserializer(newOutput.getSharedBuffer)
104+
val newInput = new DataInputDeserializer(newOutput.getSharedBuffer)
105105
val resultData = outerSerializer.deserialize(newInput)
106106

107107
resultData shouldEqual expectedData

0 commit comments

Comments
 (0)