szaszm commented on code in PR #1306:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1306#discussion_r855338573
##########
extensions/aws/processors/S3Processor.h:
##########
@@ -115,7 +115,7 @@ class S3Processor : public core::Processor {
std::shared_ptr<core::logging::Logger> logger_;
aws::s3::S3Wrapper s3_wrapper_;
- Aws::Client::ClientConfiguration client_config_;
+ std::unique_ptr<Aws::Client::ClientConfiguration> client_config_;
Review Comment:
Could `std::optional` work here instead of `std::unique_ptr`? It makes
late-init possible without an allocation.
##########
libminifi/test/aws-tests/MockS3RequestSender.h:
##########
@@ -227,7 +227,7 @@ class MockS3RequestSender : public
minifi::aws::s3::S3RequestSender {
const Aws::Client::ClientConfiguration& client_config) override {
head_object_request = request;
credentials_ = credentials;
- client_config_ = client_config;
+ client_config_ =
const_cast<Aws::Client::ClientConfiguration*>(&client_config);
Review Comment:
Maybe it would be easier to make `client_config_` `const` instead of
const_casting everywhere? I only found reading from the client config in the
tests
--
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]