You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/01/07 04:48:00 UTC
[jira] [Commented] (NIFI-9549) NonFlushableOutputStream should override all write() methods
[ https://issues.apache.org/jira/browse/NIFI-9549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470329#comment-17470329 ]
ASF subversion and git services commented on NIFI-9549:
-------------------------------------------------------
Commit d9b863a84bcd60bffd85ab9506484fcd20ff0607 in nifi's branch refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d9b863a ]
NIFI-9549: Delegate NonFlushableOutputStream write methods to wrapped OutputStream
Ensure that we delegate calls to write(byte[]) and write(byte[], int, int) to the underlying OutputStream for NonFlushableOutputStream, instead of allowing FilterOutputStream to iterate over every byte
This closes #5642
Signed-off-by: David Handermann <ex...@apache.org>
> NonFlushableOutputStream should override all write() methods
> ------------------------------------------------------------
>
> Key: NIFI-9549
> URL: https://issues.apache.org/jira/browse/NIFI-9549
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Trivial
> Fix For: 1.16.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The {{NonFlushableOutputStream}} that is used when {{ProcessSession.append}} is called extends from {{FilterOutputStream}} but does not override the {{write}} methods. As a result, calls to {{NonFlushableOutputStream.write(byte[])}} or {{NonFlushableOutputStream.write(byte[], int, int)}} will not delegate those calls to the underlying {{OutputStream}} but will instead iterate over every byte in the given array calling {{OutputStream.write(int)}} for each byte individually, which is inefficient.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)