Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1295#discussion_r90784968
  
    --- 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 --
    
    I think we need to get the buffer after we potentially change the newline.  
If we do this here then change the newline we won't see it since now we're 
getting a copy of the buffer instead of the actual underlying buffer.


---
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.
---

Reply via email to