lordgamez commented on code in PR #1999:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1999#discussion_r2322175191
##########
extensions/standard-processors/controllers/JsonTreeReader.cpp:
##########
@@ -113,12 +113,12 @@ bool readAsArray(const std::string& content,
core::RecordSet& record_set) {
return true;
}
-nonstd::expected<core::RecordSet, std::error_code> JsonTreeReader::read(const
std::shared_ptr<core::FlowFile>& flow_file, core::ProcessSession& session) {
+nonstd::expected<core::RecordSet, std::error_code>
JsonTreeReader::read(io::InputStream& input_stream) {
core::RecordSet record_set{};
- const auto read_result = session.read(flow_file, [&record_set](const
std::shared_ptr<io::InputStream>& input_stream) -> int64_t {
+ const auto read_result = [&record_set](io::InputStream& input_stream) ->
int64_t {
std::string content;
- content.resize(input_stream->size());
- const auto read_ret =
gsl::narrow<int64_t>(input_stream->read(as_writable_bytes(std::span(content))));
+ content.resize(input_stream.size());
+ const auto read_ret =
gsl::narrow<int64_t>(input_stream.read(as_writable_bytes(std::span(content))));
if (io::isError(read_ret)) {
return -1;
}
Review Comment:
Updated in latest commit
https://github.com/apache/nifi-minifi-cpp/pull/1999/commits/859cc6f12454c79bc2a95faa68d5e733e413d61e
--
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]