Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2570#discussion_r176482056
--- 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 --
In the clause above, a byte[] is wrapped in a ByteBuffer as well (that's
where I got the code from), won't we be returning two different objects in that
case?
---