lordgamez commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1275836056


##########
libminifi/src/io/StreamSlice.cpp:
##########
@@ -23,7 +23,8 @@ namespace org::apache::nifi::minifi::io {
 StreamSlice::StreamSlice(std::shared_ptr<io::InputStream> stream, size_t 
offset, size_t size) : stream_(std::move(stream)), slice_offset_(offset), 
slice_size_(size) {
   stream_->seek(slice_offset_);
   if (stream_->size() < slice_offset_ + slice_size_)
-    throw std::invalid_argument("StreamSlice is bigger than the Stream");
+    throw std::invalid_argument("StreamSlice is bigger than the Stream, Stream 
size: " + std::to_string(stream_->size()) +
+      ", StreamSlice size: " + std::to_string(slice_size_) + ", offset: " + 
std::to_string(slice_offset_));

Review Comment:
   Updated in 8a269048b9b6f451f0baedd584a4358286908a60



##########
extensions/libarchive/MergeContent.cpp:
##########
@@ -246,27 +247,30 @@ bool MergeContent::processBin(core::ProcessContext 
*context, core::ProcessSessio
     mimeType = "application/zip";
   } else {
     logger_->log_error("Merge format not supported %s", mergeFormat_);
+    session.remove(merge_flow);
     return false;
   }
 
   std::shared_ptr<core::FlowFile> mergeFlow;

Review Comment:
   Removed in 8a269048b9b6f451f0baedd584a4358286908a60



##########
extensions/libarchive/MergeContent.cpp:
##########
@@ -213,18 +213,19 @@ bool MergeContent::processBin(core::ProcessContext 
*context, core::ProcessSessio
         });
   }
 
-  std::shared_ptr<core::FlowFile> merge_flow = 
std::static_pointer_cast<FlowFileRecord>(session->create());
+  std::shared_ptr<core::FlowFile> merge_flow = 
std::static_pointer_cast<FlowFileRecord>(session.create());

Review Comment:
   Good idea, updated in 8a269048b9b6f451f0baedd584a4358286908a60



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

Reply via email to