Github user markap14 commented on a diff in the pull request: https://github.com/apache/nifi/pull/2570#discussion_r176530763 --- Diff: nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java --- @@ -609,6 +623,9 @@ private static Object convertToAvroObject(final Object rawValue, final Schema fi if (rawValue instanceof byte[]) { return ByteBuffer.wrap((byte[]) rawValue); } + if (rawValue instanceof String) { + return ByteBuffer.wrap(((String) rawValue).getBytes(charset)); --- End diff -- Whoops - my bad on this one. This is #convertToAvroObject, and I was thinking of #normalizeValue. In this case, we are converting into the object that Avro wants, so a ByteBuffer is the correct thing to do.
---