lordgamez commented on code in PR #2040:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2040#discussion_r2435751465
##########
libminifi/include/core/state/UpdatePolicy.h:
##########
@@ -107,7 +102,7 @@ class UpdatePolicyBuilder {
}
std::unique_ptr<UpdatePolicy> build() {
- std::unique_ptr<UpdatePolicy> new_policy =
std::unique_ptr<UpdatePolicy>(new UpdatePolicy(*(current_policy_.get())));
+ std::unique_ptr<UpdatePolicy> new_policy =
std::unique_ptr<UpdatePolicy>(new UpdatePolicy(*(current_policy_.get()))); //
NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
Review Comment:
Here the comment says "Defines an immutable policy map" where the copy
constructor is protected on purpose, with the UpdatePolicyBuilder defined as a
friend class. I'm not sure this is a good design or if it is still valid, but I
think refactoring the `UpdatePolicy` and `UpdatePolicyBuilder` classes should
be figured out separately and it is out of scope of this PR.
--
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]