diff --git a/build.gradle.kts b/build.gradle.kts index f816751..893fb8d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { `maven-publish` signing - id("org.jmailen.kotlinter") version "4.3.0" + id("org.jmailen.kotlinter") version "4.4.1" id("org.jetbrains.dokka") version "1.9.20" } diff --git a/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeInformation.kt b/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeInformation.kt index d446b30..8928314 100644 --- a/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeInformation.kt +++ b/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeInformation.kt @@ -34,8 +34,10 @@ public class DataClassTypeInformation( public override fun equals(other: Any?): Boolean = when (other) { is DataClassTypeInformation<*> -> - other.canEqual(this) && super.equals(other) && - genericParameters == other.genericParameters && fieldNames.contentEquals(other.fieldNames) + other.canEqual(this) && + super.equals(other) && + genericParameters == other.genericParameters && + fieldNames.contentEquals(other.fieldNames) else -> false } diff --git a/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializer.kt b/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializer.kt index 37cc66a..4abd2a5 100644 --- a/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializer.kt +++ b/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializer.kt @@ -60,9 +60,10 @@ public class DataClassTypeSerializer( null } else { createInstance( - fieldSerializers.mapIndexed { i, serializer -> - serializer.copy(from.component(i)) - }.toTypedArray(), + fieldSerializers + .mapIndexed { i, serializer -> + serializer.copy(from.component(i)) + }.toTypedArray(), ) } } diff --git a/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializerSnapshot.kt b/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializerSnapshot.kt index cd16dcc..481f299 100644 --- a/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializerSnapshot.kt +++ b/src/main/kotlin/com/lapanthere/flink/api/kotlin/typeutils/DataClassTypeSerializerSnapshot.kt @@ -6,8 +6,7 @@ import org.apache.flink.core.memory.DataInputView import org.apache.flink.core.memory.DataOutputView import org.apache.flink.util.InstantiationUtil -public class DataClassTypeSerializerSnapshot : - CompositeTypeSerializerSnapshot> { +public class DataClassTypeSerializerSnapshot : CompositeTypeSerializerSnapshot> { private var type: Class? = null public constructor() : super(DataClassTypeSerializer::class.java) diff --git a/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/Classes.kt b/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/Classes.kt index ee8a5d6..cef63f1 100644 --- a/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/Classes.kt +++ b/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/Classes.kt @@ -16,15 +16,24 @@ data class Word( ) @TypeInfo(DataClassTypeInfoFactory::class) -data class WordCount(val count: Int = 0, val word: Word) +data class WordCount( + val count: Int = 0, + val word: Word, +) @TypeInfo(DataClassTypeInfoFactory::class) class NotADataClass @TypeInfo(DataClassTypeInfoFactory::class) -data class Basic(val abc: String, val field: Int) +data class Basic( + val abc: String, + val field: Int, +) -data class ParameterizedClass(val name: String, val field: T) +data class ParameterizedClass( + val name: String, + val field: T, +) @TypeInfo(DataClassTypeInfoFactory::class) data class Nested( @@ -38,8 +47,12 @@ data class DataClass( val nested: Nested, ) : Serializable -data class Purchase(val amount: Double) +data class Purchase( + val amount: Double, +) -data class Order(val purchases: List) { +data class Order( + val purchases: List, +) { constructor(vararg purchases: Purchase) : this(purchases.toList()) } diff --git a/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/ExampleTest.kt b/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/ExampleTest.kt index be093e4..5e5c594 100644 --- a/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/ExampleTest.kt +++ b/src/test/kotlin/com/lapanthere/flink/api/kotlin/typeutils/ExampleTest.kt @@ -13,7 +13,8 @@ internal class ExampleTest { @JvmStatic private val cluster = MiniClusterWithClientResource( - MiniClusterResourceConfiguration.Builder() + MiniClusterResourceConfiguration + .Builder() .setNumberSlotsPerTaskManager(2) .setNumberTaskManagers(1) .build(),