From c62395a2740d2e4e16a052042a5a81e546c4adce Mon Sep 17 00:00:00 2001 From: james Date: Sun, 29 Jan 2023 17:57:46 +0000 Subject: [PATCH] Fixing null return --- .../kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn2.kt | 2 +- .../kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn3.kt | 2 +- .../kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn4.kt | 2 +- .../kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn5.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn2.kt b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn2.kt index ad9e8a9..1311cde 100644 --- a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn2.kt +++ b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn2.kt @@ -25,7 +25,7 @@ data class MultipleReturn2, b, B: ReturnValue>(val first } } composite.endStructure(descriptor) - return f!! to s!! + return f as a to s as b } override fun serialize(encoder: Encoder, value: Pair) { diff --git a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn3.kt b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn3.kt index 6219ea8..bca6751 100644 --- a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn3.kt +++ b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn3.kt @@ -28,7 +28,7 @@ data class MultipleReturn3, b, B: ReturnValue, c, C: Ret } } composite.endStructure(descriptor) - return Triple(f!!, s!!, t!!) + return Triple(f as a, s as b, t as c) } override fun serialize(encoder: Encoder, value: Triple) { diff --git a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn4.kt b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn4.kt index b459dc8..0286188 100644 --- a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn4.kt +++ b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn4.kt @@ -30,7 +30,7 @@ data class MultipleReturn4, b, B: ReturnValue, c, C: Re } } composite.endStructure(descriptor) - return Vec(p1!!, p2!!, p3!!, p4!!) + return Vec(p1 as a, p2 as b, p3 as c, p4 as d) } override fun serialize(encoder: Encoder, value: Vec) { diff --git a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn5.kt b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn5.kt index 8f6c35c..8c51779 100644 --- a/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn5.kt +++ b/src/main/kotlin/uk/gibby/neo4k/returns/multiple/MultipleReturn5.kt @@ -32,7 +32,7 @@ data class MultipleReturn5, b, B: ReturnValue, c, C: Re } } composite.endStructure(descriptor) - return Vec(p1!!, p2!!, p3!!, p4!!, p5!!) + return Vec(p1 as a, p2 as b, p3 as c, p4 as d, p5 as e) } override fun serialize(encoder: Encoder, value: Vec) {