Remove joda-time library and use Java 8 time instead#355
Remove joda-time library and use Java 8 time instead#355chriskilding wants to merge 3 commits intojava-json-tools:masterfrom
Conversation
|
This change might be an alternative solution to #142 |
|
Starting with a largely mechanical line-by-line translation of Joda Time API calls to their Java 8 Time equivalents, to see what works and what doesn't. |
|
First note is that Java 8's Several of the tests fail only because they use fraction widths longer than 9, so we'd need to delete those. |
|
Just 3 test failures to go...
Java time tolerates the 30th February whereas Joda rejects it: Java time tolerates "24:00:00" whereas Joda rejects it: |
| .appendLiteral(':') | ||
| .appendValue(ChronoField.SECOND_OF_MINUTE, 2) | ||
| .appendOptional(secFracsParser) | ||
| .appendZoneOrOffsetId(); |
There was a problem hiding this comment.
Could be the cause of (overly?) strict offset validation, causing +0100 to be rejected.
|
Do you need help with the PR. I am willing to help as we need this change for one of our projects |
|
I do need suggestions on what should be done about the remaining 3 tests - whether each Java 8 time behaviour difference is acceptable (so we need to update or delete the relevant tests) or not (so we need to fine tune the implementation). The library maintainers need to provide their opinion on this as well. Also if you can think of relevant missing test cases then please do suggest/add them :) |
|
@Capstan would you (or one of the other maintainers) be able to take a look at this? |
|
@ajorg-aws would you (or another maintainer) be able to review this? |
Hello! I'm not a maintainer, just a contributor. The commit you see from me was contributed in #351 |
|
@Capstan would you (or another maintainer) be able to take a look at this? |
|
@chriskilding That is a really nice and necessary change! Shall we contact maintainers? |
|
@huggsboson I believe you are one of the other maintainers in the java-json-tools org. Would you be able to review this and give me some design guidance to resolve the last failing tests, and then we can see about merging this? |
Remove
joda-timelibrary and use Java 8 time instead.