Skip to content

Commit

Permalink
Check for globalUseJavaString before prop
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Apr 28, 2024
1 parent 06aeb11 commit 1f1f52e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object StringEncoder : Encoder<String> {
override fun encode(schema: Schema, value: String): Any {
return when (schema.type) {
Schema.Type.STRING -> when {
schema.getProp(GenericData.STRING_PROP) == "String" || Encoder.globalUseJavaString -> value
Encoder.globalUseJavaString || schema.getProp(GenericData.STRING_PROP) == "String" -> value
else -> UTF8StringEncoder.encode(schema, value)
}
Schema.Type.BYTES -> ByteStringEncoder.encode(schema, value)
Expand Down

0 comments on commit 1f1f52e

Please sign in to comment.