martinzink commented on code in PR #1926:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1926#discussion_r2000465182


##########
extensions/standard-processors/processors/GetTCP.cpp:
##########
@@ -86,33 +88,26 @@ std::optional<asio::ssl::context> 
GetTCP::parseSSLContext(core::ProcessContext&
 }
 
 uint64_t GetTCP::parseMaxBatchSize(core::ProcessContext& context) {
-  if (auto max_batch_size = context.getProperty<uint64_t>(MaxBatchSize)) {
-    if (*max_batch_size == 0) {
-      throw Exception(PROCESS_SCHEDULE_EXCEPTION, fmt::format("{} should be 
non-zero.", MaxBatchSize.name));
-    }
-    return *max_batch_size;
-  }
-  static_assert(MaxBatchSize.default_value);
-  return MaxBatchSize.type->parse(*MaxBatchSize.default_value);
+  return utils::parseU64Property(context, MaxBatchSize);

Review Comment:
   good catch, 
https://github.com/apache/nifi-minifi-cpp/pull/1926/commits/73ab755df02487c531c3b7d80ad55e02350b8be6



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