Skip to content

Commit 791703c

Browse files
style(internal): move identity methods to bottom of error class (#12)
1 parent bdb4a60 commit 791703c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

openai-java-core/src/main/kotlin/com/openai/errors/OpenAIError.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ private constructor(
1919
val additionalProperties: Map<String, JsonValue>,
2020
) {
2121

22-
override fun equals(other: Any?): Boolean {
23-
if (this === other) {
24-
return true
25-
}
26-
27-
return /* spotless:off */ other is OpenAIError && additionalProperties == other.additionalProperties /* spotless:on */
28-
}
29-
30-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */
31-
32-
override fun toString() = "OpenAIError{additionalProperties=$additionalProperties}"
33-
3422
fun toBuilder() = Builder().from(this)
3523

3624
companion object {
@@ -69,4 +57,16 @@ private constructor(
6957

7058
fun build(): OpenAIError = OpenAIError(additionalProperties.toImmutable())
7159
}
60+
61+
override fun equals(other: Any?): Boolean {
62+
if (this === other) {
63+
return true
64+
}
65+
66+
return /* spotless:off */ other is OpenAIError && additionalProperties == other.additionalProperties /* spotless:on */
67+
}
68+
69+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */
70+
71+
override fun toString() = "OpenAIError{additionalProperties=$additionalProperties}"
7272
}

0 commit comments

Comments
 (0)