exceptionfactory commented on code in PR #9796:
URL: https://github.com/apache/nifi/pull/9796#discussion_r1990155603
##########
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/FormatUtils.java:
##########
@@ -242,11 +244,13 @@ public static Instant parseToInstant(DateTimeFormatter
formatter, String text) {
throw new IllegalArgumentException("Text cannot be null");
}
- TemporalAccessor parsed = formatter.parseBest(text, Instant::from,
LocalDateTime::from, LocalDate::from, LocalTime::from);
+ TemporalAccessor parsed = formatter.parseBest(text, Instant::from,
LocalDateTime::from, LocalDate::from, YearMonth::from, Year::from,
LocalTime::from);
Review Comment:
Minor adjustment, but I recommend moving the `YearMonth` and `Year` queries
to the end, matching the switch statement that follows.
--
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]