adamdebreceni commented on a change in pull request #1225:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1225#discussion_r767811081



##########
File path: extensions/rocksdb-repos/ProvenanceRepository.h
##########
@@ -83,12 +83,11 @@ class ProvenanceRepository : public core::Repository, 
public std::enable_shared_
     }
     logger_->log_debug("MiNiFi Provenance Max Partition Bytes %d", 
max_partition_bytes_);
     if (config->get(Configure::nifi_provenance_repository_max_storage_time, 
value)) {
-      core::TimeUnit unit;
-      if (core::Property::StringToTime(value, max_partition_millis_, unit)) {
-        core::Property::ConvertTimeUnitToMS(max_partition_millis_, unit, 
max_partition_millis_);
-      }
+      auto max_partition = 
utils::timeutils::StringToDuration<std::chrono::milliseconds>(value);
+      if (max_partition.has_value())

Review comment:
       we could use the declaration form of the if statement here as well




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