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


##########
extensions/aws/s3/MultipartUploadStateStorage.cpp:
##########
@@ -57,11 +57,11 @@ std::optional<MultipartUploadState> 
MultipartUploadStateStorage::getState(const
   MultipartUploadState state;
   state.upload_id = state_map[state_key + ".upload_id"];
 
-  core::Property::StringToInt(state_map[state_key + ".upload_time"], 
state.upload_time_ms_since_epoch);
-  core::Property::StringToInt(state_map[state_key + ".uploaded_parts"], 
state.uploaded_parts);
-  core::Property::StringToInt(state_map[state_key + ".uploaded_size"], 
state.uploaded_size);
-  core::Property::StringToInt(state_map[state_key + ".part_size"], 
state.part_size);
-  core::Property::StringToInt(state_map[state_key + ".full_size"], 
state.full_size);
+  state.upload_time_ms_since_epoch = 
parsing::parseIntegral<int64_t>(state_map[state_key + ".upload_time"]) | 
utils::expect("Expected parsable upload_time_ms_since_epoch");
+  state.uploaded_parts = parsing::parseIntegral<size_t>(state_map[state_key + 
".uploaded_parts"]) | utils::expect("Expected parsable state.uploaded_parts");
+  state.uploaded_size = parsing::parseIntegral<uint64_t>(state_map[state_key + 
".uploaded_size"]) | utils::expect("Expected parsable state.uploaded_size");
+  state.part_size = parsing::parseIntegral<uint64_t>(state_map[state_key + 
".part_size"]) | utils::expect("Expected parsable state.part_size");
+  state.full_size = parsing::parseIntegral<uint64_t>(state_map[state_key + 
".full_size"]) | utils::expect("Expected parsable state.full_size");

Review Comment:
   reasonable request 👍 :D 
https://github.com/apache/nifi-minifi-cpp/pull/1926/commits/cad3608831b52f39911634a1558eb81a320e0250



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