diff --git a/core/common/src/Exceptions.kt b/core/common/src/Exceptions.kt index 1f5e93ed..0f43109c 100644 --- a/core/common/src/Exceptions.kt +++ b/core/common/src/Exceptions.kt @@ -13,6 +13,10 @@ public class DateTimeArithmeticException: RuntimeException { public constructor(message: String): super(message) public constructor(cause: Throwable): super(cause) public constructor(message: String, cause: Throwable): super(message, cause) + + private companion object { + private const val serialVersionUID: Long = -3207806170214997982L + } } /** @@ -23,6 +27,10 @@ public class IllegalTimeZoneException: IllegalArgumentException { public constructor(message: String): super(message) public constructor(cause: Throwable): super(cause) public constructor(message: String, cause: Throwable): super(message, cause) + + private companion object { + private const val serialVersionUID: Long = 1159315966274264801L + } } internal class DateTimeFormatException: IllegalArgumentException { @@ -30,4 +38,8 @@ internal class DateTimeFormatException: IllegalArgumentException { constructor(message: String): super(message) constructor(cause: Throwable): super(cause) constructor(message: String, cause: Throwable): super(message, cause) + + private companion object { + private const val serialVersionUID: Long = 4231196759387994100L + } } diff --git a/core/common/src/internal/format/parser/Parser.kt b/core/common/src/internal/format/parser/Parser.kt index 9958e3fb..5e1c3f84 100644 --- a/core/common/src/internal/format/parser/Parser.kt +++ b/core/common/src/internal/format/parser/Parser.kt @@ -209,7 +209,13 @@ internal value class Parser>( ) } -internal class ParseException(errors: List) : Exception(formatError(errors)) +// note that the message of this exception could be anything (even null) after deserialization of a manually constructed +// or corrupted stream (via Java Object Serialization) +internal class ParseException(errors: List) : Exception(formatError(errors)) { + private companion object { + private const val serialVersionUID: Long = 5691186997393344103L + } +} private fun formatError(errors: List): String { if (errors.size == 1) {