lordgamez commented on a change in pull request #1137:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1137#discussion_r690130119



##########
File path: extensions/standard-processors/processors/AttributesToJSON.cpp
##########
@@ -94,10 +95,11 @@ void AttributesToJSON::onSchedule(core::ProcessContext* 
context, core::ProcessSe
 }
 
 bool AttributesToJSON::isCoreAttributeToBeFiltered(const std::string& 
attribute) const {
-  return !include_core_attributes_ && core_attributes_.find(attribute) != 
core_attributes_.end();
+  const auto& special_attributes = 
core::SpecialFlowAttribute::getSpecialFlowAttributes();
+  return !include_core_attributes_ && ranges::find(special_attributes, 
attribute) != ranges::end(special_attributes);
 }
 
-std::unordered_set<std::string> 
AttributesToJSON::getAttributesToBeWritten(const std::map<std::string, 
std::string>& flowfile_attributes) const {
+std::unordered_set<std::string> 
AttributesToJSON::getAttributesToBeWritten(core::FlowFile::AttributeMap* 
flowfile_attributes) const {

Review comment:
       Good point, we can safely change it as the pointer is just the returned 
address of the internal member. Updated in 
effc866d914fb3ccff4f70a7a0ebcea6305403fc




-- 
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]


Reply via email to