Ensure InstantFormatter can properly deserialize ISO-formatted dates#23895
Ensure InstantFormatter can properly deserialize ISO-formatted dates#23895monosoul wants to merge 3 commits into
Conversation
|
@monosoul Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@monosoul Thank you for signing the Contributor License Agreement! |
|
@jhoeller as per our discussion at Joker conf, here's a PR to fix |
|
@sbrannen all fixed! |
|
Thanks for making the changes. We'll hold off on merging this into |
|
By the way, nice use of custom |
|
@sbrannen thank you! Regarding the test names (locale part), I just forgot to include this part of the contract into the test names. Should I fix it? |
No. I think it's OK like it is. |
|
For future reference, please make sure you execute I'll fix those locally before merging. |
|
Oh, sorry for that. I can fix it myself if you didn't do that yet. |
No worries. I've already handled that locally. |
|
This has been merged into Thanks |
Prior to this commit, InstantFormatter was able to properly serialize an Instant that is far in the future (or in the past), but it could not properly deserialize it, because in such scenarios an ISO-formatted Instant starts with a +/- sign. This commit fixes this issue, while maintaining the previous contract, and also introduces tests for InstantFormatter. Closes spring-projectsgh-23895
At the moment
InstantFormattercan serialize anInstantthat is far in the future (or in the past), but cannot properly deserialize it, because in this case ISO-formatted instant will start with+/--sign. This PR fixes this issue, while maintaining the previous contract.Also, it introduces tests for
InstantFormatter🙂