frankframework / frankframework/frankframework
Migrate *Parameter classes to not use SimpleDateFormat but DateTimeFormatter
- Dominant language
- Java
- Stars
- 167
- Forks
- 87
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 206
Description
### Related Problem or Business Case
In scope of #5456 I've tried to migrate `SimpleDateFormat` to `DateTimeFormatter`. In scope of the Parameter based classes, this wasn't possible as a drop in replacement. `DateParameter` relies on `java.util.Date` still. We can't migrate this fully to Java time API yet, but I've tried to migrate the Formatting at least. I found out that we have several cases, where the pattern describes a format that is _part_ of the input. For instance, the pattern describes 'dd-MM-yyyy' where the input is '31-12-2024 12:12:12.123'. The 'old' `SimpleDateFormat` simple only grabs the first (date) part of the input, but `DateTimeFormatter` complains that the pattern isn't matching the input. This is obvious in `org.frankframework.parameters.ParameterValueTest#testDateToString`.
There are probably several possibilities here, but at first this relies on how we proceed separating `DateParameter` further from `AbstractParameter` (for instance, 'fixedDate' determination is still part of AbstractParameter, although it relies on the pattern which isn't available here ..).
### In scope
Migrate SimpleDateFormat (java.util.Date) to DateTimeFormatter (java.time.*) in the Parameter classes:
* AbstractParameter
* DateParameter
* DateParameterTest
* ParameterTest
* ParameterValueTest
Perhaps this can be done together with rework on Parameter type extraction
### Collaboration with External Companies
No, community resolution only
Contributor guide
Assessment
This issue has not been assessed yet.