greyp9 commented on code in PR #6131:
URL: https://github.com/apache/nifi/pull/6131#discussion_r931307176
##########
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java:
##########
@@ -593,6 +609,9 @@ private void writeRecordData(final ProcessSession session,
final List<ConsumerRe
try {
Record record;
while ((record = reader.nextRecord()) != null) {
Review Comment:
Rather than tracking state, would it be reasonable to predetermine the
decision based on `consumerRecord.value()` a few lines above?
```
final byte[] recordBytes = consumerRecord.value() == null ? new byte[0] :
consumerRecord.value();
```
(If it is possible to emit no record even with non-null data, I guess this
wouldn't work.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]