You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "martinzink (via GitHub)" <gi...@apache.org> on 2023/04/20 08:46:53 UTC

[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1562: MINIFICPP-2106 Add 'Use Path Style Access' property to PutS3Object

martinzink commented on code in PR #1562:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1562#discussion_r1171511190


##########
extensions/aws/processors/PutS3Object.cpp:
##########
@@ -73,6 +73,11 @@ void PutS3Object::onSchedule(const std::shared_ptr<core::ProcessContext> &contex
   }
   logger_->log_debug("PutS3Object: Server Side Encryption [%s]", server_side_encryption_);
 
+  bool use_path_style_access = false;
+  if (context->getProperty(UsePathStyleAccess.getName(), use_path_style_access)) {
+    use_virtual_addressing_ = !use_path_style_access;
+  }
+

Review Comment:
   Nitpick but I think we could improve the readability and limit the scope of the use_path_style_access by using the optional returning getProperty
   ```suggestion
     if (auto use_path_style_access = context->getProperty<bool>(UsePathStyleAccess)) {
       use_virtual_addressing_ = !*use_path_style_access;
     }
   ```



-- 
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-unsubscribe@nifi.apache.org

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