szaszm commented on code in PR #1466:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1466#discussion_r1073643531


##########
extensions/sql/processors/PutSQL.h:
##########
@@ -53,6 +55,9 @@ class PutSQL : public SQLProcessor {
   void processOnTrigger(core::ProcessContext& context, core::ProcessSession& 
session) override;
 
   void initialize() override;
+
+ private:
+  static std::shared_ptr<core::logging::Logger> logger_;

Review Comment:
   Static logger here as well



##########
libminifi/test/TestBase.cpp:
##########
@@ -234,12 +234,16 @@ std::shared_ptr<minifi::core::Processor> 
TestPlan::addProcessor(const std::share
   processor->setFlowIdentifier(flow_version_->getFlowIdentifier());
   processor_mapping_[processor->getUUID()] = processor;
   if (!linkToPrevious) {
-    termination_ = *(relationships.begin());
+    if (!std::empty(relationships)) {
+      termination_ = *(relationships.begin());

Review Comment:
   ```suggestion
         termination_ = relationships.front();
   ```



##########
libminifi/test/TestBase.cpp:
##########
@@ -234,12 +234,16 @@ std::shared_ptr<minifi::core::Processor> 
TestPlan::addProcessor(const std::share
   processor->setFlowIdentifier(flow_version_->getFlowIdentifier());
   processor_mapping_[processor->getUUID()] = processor;
   if (!linkToPrevious) {
-    termination_ = *(relationships.begin());
+    if (!std::empty(relationships)) {
+      termination_ = *(relationships.begin());
+    }
   } else {
     std::shared_ptr<minifi::core::Processor> last = processor_queue_.back();
     if (last == nullptr) {
       last = processor;
-      termination_ = *(relationships.begin());
+      if (!std::empty(relationships)) {
+        termination_ = *(relationships.begin());

Review Comment:
   ```suggestion
           termination_ = relationships.front();
   ```



-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to