Closed Isira-Seneviratne closed 3 years ago
Hey @Isira-Seneviratne . Thank you so very much for this pull request! This is a fantastic update. I'll need some time to review and make sure everything is in order, but at first glance this is amazing.
I really appreciate you putting the effort into updating the APIs for Java 8 (something I've long wanted to do but haven't had much time for.)
This PR looks great. I did some additional cleanup of failing tests that had been accumulating over time from various PRs and code rot. I also cleaned up the imports to not use the *
import, which can cause unnecessary classloading.
Lastly, I did some additional code cleanup to fix compiler warnings for unused or redundant super interfaces and other issues.
The project has also been updated to compile and use Java 1.8 as a minimum requirement.
Since the changes are not entirely backwards compatible (unless I am mistaken), this release will bump the PrettyTime major version to 5.0.0, a major milestone!
@Isira-Seneviratne I've added you as a developer in the pom.xml -- THANK you for this major contribution.
Happy to help :)
On another note, putIfAbsent
isn't supported on Android API levels below 24, so that'd need to be changed for prettytime 4.x.
Interesting. Do you think that's worth a patch release? Android < 24 is quite dated at this point.
Yeah, but most apps have a minSdkVersion
below 24 to be compatible with as many devices as possible.
Make use of features added in Java 8, and add methods that accept the
java.time
date/time types.This fixes https://github.com/ocpsoft/prettytime/issues/109.