fgerlits commented on a change in pull request #1028:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r595303389
##########
File path: extensions/standard-processors/processors/ExtractText.cpp
##########
@@ -126,22 +125,22 @@ int64_t ExtractText::ReadCallback::process(const
std::shared_ptr<io::BaseStream>
if (sizeLimitStr.empty())
size_limit = DEFAULT_SIZE_LIMIT;
else if (sizeLimitStr != "0")
- size_limit = std::stoi(sizeLimitStr);
+ size_limit = gsl::narrow_cast<size_t>(std::stoi(sizeLimitStr));
Review comment:
I think throwing an exception in `onSchedule()` would be better than
treating a limit of "-2" as a limit of 18.4 exabytes, but this is how the code
was working before this PR, and I agree that changing it would be out of scope.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]