FINERACT-2611: Allow MakerCheckerRequest does not accept makerDateTim…#5864
Open
Vectorquantiy wants to merge 2 commits into
Open
Conversation
…eFrom and makerDateTimeTo properly
| return OffsetDateTime.from(parsed); | ||
| } else if (hasTime) { | ||
| LocalDateTime localDateTime = LocalDateTime.from(parsed); | ||
| return localDateTime.atOffset(OffsetDateTime.now().getOffset()); |
Contributor
There was a problem hiding this comment.
Please use ZoneOffset.UTC getAuditZoneId() instead of now() everywhere
| if (dateTimeStr == null || dateTimeStr.isBlank()) { | ||
| return null; | ||
| } | ||
| final Locale locale = localeStr == null ? null : JsonParserHelper.localeFromString(localeStr); |
Contributor
There was a problem hiding this comment.
Locale locale should be passed as parameter
|
|
||
| public static OffsetDateTime convertDateTimeStringToOffsetDateTime(String dateTimeStr, String dateFormat, String localeStr, | ||
| LocalTime fallbackTime) { | ||
| if (dateTimeStr == null || dateTimeStr.isBlank()) { |
Contributor
There was a problem hiding this comment.
minor: Strings.isEmpty(stringDateTime) is simpler
| } | ||
| } | ||
|
|
||
| public static OffsetDateTime convertDateTimeStringToOffsetDateTime(String dateTimeStr, String dateFormat, String localeStr, |
Contributor
There was a problem hiding this comment.
If we follow the naming convention in this utility parseOffsetDateTime would be consequent.
There are other parseOffsetDateTime methods, could you please move this next to them?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…eFrom and makerDateTimeTo properly
Description
@QueryParam does not automatically convert String query parameters into java.time.ZonedDateTime.
Therefor makerDateTimeFrom and makerDateTimeTo is always resolving to null in MakerCheckerRequest.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.