Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2570#discussion_r176440529
--- 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 --
I would prefer to avoid ByteBuffer here and instead use just byte[]
---