martinzink commented on code in PR #1926:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1926#discussion_r1995255761
##########
extension-utils/src/utils/ListingStateManager.cpp:
##########
@@ -51,10 +51,11 @@ uint64_t
ListingStateManager::getLatestListedKeyTimestampInMilliseconds(const st
stored_listed_key_timestamp_str = it->second;
}
- int64_t stored_listed_key_timestamp = 0;
- core::Property::StringToInt(stored_listed_key_timestamp_str,
stored_listed_key_timestamp);
+ if (auto stored_listed_key_timestamp =
parsing::parseIntegral<int64_t>(stored_listed_key_timestamp_str)) {
+ return *stored_listed_key_timestamp;
+ }
- return stored_listed_key_timestamp;
+ throw std::runtime_error("Invalid listed key timestamp");
Review Comment:
makes sense,
https://github.com/apache/nifi-minifi-cpp/pull/1926/commits/10f9b36d1d423e78303f0c8de0ffdfc4a250c977
--
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]