Skip to content

Commit

Permalink
make Scala 2.12 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrp committed Oct 6, 2024
1 parent 28b7e73 commit bd4a310
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ object KafkaJsonExceptionSerializationSchema {
// |{
// | "inputEvent" : {
// | "name": ...
val warningBytes = 2 * indentLength + Utils.utf8Length(s"\"$warningKey\" : ${messageTemplate.asJson.spaces2},\n")
// (note: line below uses '' as quotes because Scala 2.12 can't handle escaped "")
val warningBytes = 2 * indentLength + Utils.utf8Length(s"'$warningKey' : ${messageTemplate.asJson.spaces2},\n")
val bytesToCut = valueBytes + warningBytes - maxValueBytes

val variablesWithLength = countVariableLengths(value.hcursor.downField("inputEvent"))
Expand Down

0 comments on commit bd4a310

Please sign in to comment.