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



##########
File path: libminifi/include/processors/ProcessorUtils.h
##########
@@ -61,25 +59,15 @@ class ProcessorUtils {
     if (ptr == nullptr) {
       return nullptr;
     }
-    auto returnPtr = std::dynamic_pointer_cast<core::Processor>(ptr);
-
-    if (returnPtr == nullptr) {
+    if (dynamic_cast<core::Processor*>(ptr.get()) == nullptr) {
       throw std::runtime_error("Invalid return from the classloader");
     }
 
+    auto returnPtr = 
std::unique_ptr<core::Processor>{dynamic_cast<core::Processor*>(ptr.release())};

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