arpadboda commented on a change in pull request #533: MINIFICPP-726 - Enhance 
ExtractText to have more feature parity with …
URL: https://github.com/apache/nifi-minifi-cpp/pull/533#discussion_r274341039
 
 

 ##########
 File path: libminifi/src/processors/ExtractText.cpp
 ##########
 @@ -74,11 +111,13 @@ void ExtractText::onTrigger(core::ProcessContext 
*context, core::ProcessSession
 int64_t ExtractText::ReadCallback::process(std::shared_ptr<io::BaseStream> 
stream) {
   int64_t ret = 0;
   uint64_t read_size = 0;
+  bool regex_mode = RegexMode.getDefaultValue();
 
 Review comment:
   Because getProperty call doesn't assign value to the reference in case the 
property is not found. 
   Yes, it should always be found as these properties have default values, but 
I prefer not to leave such traps in the  code. 
   
   I was wondering on introducing a function call with a fallback value in 
signature, like:
   ```
   T TryGetProperty(const std::string name, const T& fallBackValue);
   ```
   
   Which would make such codes a bit nicer. 
   

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

Reply via email to