fgerlits commented on code in PR #1433:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1433#discussion_r997098824
##########
libminifi/include/core/Core.h:
##########
@@ -111,28 +111,28 @@ std::unique_ptr<T> instantiate(const std::string name =
{}) {
*/
class CoreComponent {
public:
- explicit CoreComponent(const std::string &name, const utils::Identifier
&uuid = {}, const std::shared_ptr<utils::IdGenerator> &idGenerator =
utils::IdGenerator::getIdGenerator());
+ explicit CoreComponent(std::string name, const utils::Identifier &uuid = {},
const std::shared_ptr<utils::IdGenerator> &idGenerator =
utils::IdGenerator::getIdGenerator());
CoreComponent(const CoreComponent &other) = default;
CoreComponent(CoreComponent &&other) = default;
CoreComponent& operator=(const CoreComponent&) = default;
CoreComponent& operator=(CoreComponent&&) = default;
virtual ~CoreComponent() = default;
- // Get component name Name
+ // Get component name
[[nodiscard]] virtual std::string getName() const;
/**
* Set name.
* @param name
*/
- void setName(const std::string &name);
+ virtual void setName(std::string name);
/**
* Set UUID in this instance
* @param uuid uuid to apply to the internal representation.
*/
- void setUUID(const utils::Identifier& uuid);
+ virtual void setUUID(const utils::Identifier& uuid);
Review Comment:
Good catch! These being non-virtual looks like a bug.
--
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]