nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110,1111 -
PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r374835864
##########
File path: extensions/standard-processors/processors/LogAttribute.cpp
##########
@@ -88,23 +88,14 @@ void LogAttribute::initialize() {
}
void LogAttribute::onSchedule(const std::shared_ptr<core::ProcessContext>
&context, const std::shared_ptr<core::ProcessSessionFactory> &factory) {
- core::Property flowsToLog = FlowFilesToLog;
-
- if (getProperty(FlowFilesToLog.getName(), flowsToLog)) {
- // we are going this route since to avoid breaking backwards compatibility
the get property function doesn't perform validation ( That's done
- // in configuration. In future releases we can add that exception handling
there.
- if (!flowsToLog.getValue().validate("Validating FlowFilesToLog").valid())
- throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Invalid value for flowfiles
to log: " + flowsToLog.getValue().to_string());
- flowfiles_to_log_ = flowsToLog.getValue();
- }
Review comment:
This line, if I wrote like:
```
if (!context->getProperty(FlowFilesToLog.getName(), flowfiles_to_log_)) {
throw ...
}
```
Then the GetTCPTest (only this) will fail due to exception, so I guess that
test's configuration has issues, will take a look later.
----------------------------------------------------------------
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]
With regards,
Apache Git Services