adam-markovics commented on a change in pull request #1252:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1252#discussion_r813076252



##########
File path: libminifi/src/core/ProcessSession.cpp
##########
@@ -1034,14 +1030,18 @@ void ProcessSession::ensureNonNullResourceClaim(
 }
 
 std::shared_ptr<core::FlowFile> ProcessSession::get() {
-  std::shared_ptr<Connectable> first = 
process_context_->getProcessorNode()->pickIncomingConnection();
+  const auto first = 
process_context_->getProcessorNode()->pickIncomingConnection();
 
   if (first == nullptr) {
     logger_->log_trace("Get is null for %s", 
process_context_->getProcessorNode()->getName());
     return nullptr;
   }
 
-  std::shared_ptr<Connection> current = 
std::static_pointer_cast<Connection>(first);
+  auto current = dynamic_cast<Connection*>(first);
+  if (!current) {
+    logger_->log_error("Get could not find current Connection for %s", 
process_context_->getProcessorNode()->getName());

Review comment:
       Done.




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