Github user joewitt commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1295#discussion_r90785153
--- Diff:
nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunk.java
---
@@ -185,7 +185,7 @@ public void process(final InputStream in) throws
IOException {
// if TCP and we don't end in a new line then add one
final String protocol = context.getProperty(PROTOCOL).getValue();
if (protocol.equals(TCP_VALUE.getValue())) {
- final byte[] buf = baos.getUnderlyingBuffer();
+ final byte[] buf = baos.toByteArray();
--- End diff --
actually i don't think it will break it. however, we should take care to
ensure we only create the buffer copy one time when we don't have to add the
newline and twice when we do . Right now it would get done twice always as
shown here
https://github.com/apache/nifi/blob/70ede6ecd97d344d9883a859dd4974141cba4224/nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunk.java#L188
and here
https://github.com/apache/nifi/blob/70ede6ecd97d344d9883a859dd4974141cba4224/nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunk.java#L201
Thanks
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---