Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
ParseDateFieldUpdateProcessorFactory.parseInstant repeatedly calls all configured date parsers (DateTimeFormatter-s) for each incoming date-like field. However, it uses DateTimeFormatter.parse(dateStr) method that needs to allocate a throwaway instance of ParsePosition, instead of DateTimeFormatter.parse(dateStr, parsePosition).
Javadocs for this method suggest reusing (and reseting) a single instance of ParsePosition for multiple calls in order to reduce object allocations.