szaszm commented on a change in pull request #914:
URL: https://github.com/apache/nifi-minifi-cpp/pull/914#discussion_r501673502
##########
File path: libminifi/include/properties/Properties.h
##########
@@ -65,7 +65,7 @@ class Properties {
* @param value value in which to place the map's stored property value
* @returns true if found, false otherwise.
*/
- bool get(const std::string &key, std::string &value) const;
+ bool getString(const std::string &key, std::string &value) const;
Review comment:
> We don't need get() to be virtual, and hiding a non-virtual function
isn't nice.
I don't think hiding is a big issue. What I don't like is that a change in a
derived class forces the parent class to change in an undesirable way.
> Properties has a getInt() method, so getString() makes sense.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ro-equivalent
Also, getInt isn't too important, just a convenience overload from the times
before optional and map. `Properties` is a string key-string value store, so I
as a user shouldn't need to say `getString` when retrieving a value, because I
already said that by using the `Properties` class.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]