mosermw commented on code in PR #7760:
URL: https://github.com/apache/nifi/pull/7760#discussion_r1337711799
##########
nifi-commons/nifi-flowfile-packager/src/main/java/org/apache/nifi/util/FlowFilePackagerV3.java:
##########
@@ -36,8 +36,8 @@ public void packageFlowFile(final InputStream in, final
OutputStream out, final
} else {
writeFieldLength(out, attributes.size()); //write out the number
of attributes
for (final Map.Entry<String, String> entry :
attributes.entrySet()) { //write out each attribute key/value pair
- writeString(entry.getKey(), out);
- writeString(entry.getValue(), out);
+ writeString(entry.getKey() == null ? "" : entry.getKey(), out);
Review Comment:
OK that makes sense. Successfully handling a null key allows bad behavior.
Developers need to be placed in timeout if they cause a NullPointerException!
--
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]