jjwt icon indicating copy to clipboard operation
jjwt copied to clipboard

Remove Clock in favor of Supplier<Date>

Open lhazlewood opened this issue 7 years ago • 2 comments

Requires JDK 8, i.e. 1.0.0 release #java

lhazlewood avatar Jul 17 '18 21:07 lhazlewood

~~Why not Supplier<Instant> then?~~ Seems there are multiple issues that propose moving to java.time classes. However the wording still doesn't make much sense - if we have to use java.util.function.Supplier available since Java 8, we don't introduce more breakage by moving to java.time.Instant as well.

virtual-machinist avatar Sep 09 '19 11:09 virtual-machinist

For all sorts of good reasons, JJWT strictly adheres to Semantic Versioning. This means you cannot introduce backwards-incompatible language features into minor or point releases. So, Java 8 language features and classes/interfaces are not usable until we can increment a major version number, i.e. JJWT 1.0 or later.

1.0 will not be released until we finish JSON Web Encryption #279 . That will probably be in the last minor release (e.g. 0.11 or 0.12 or whatever). Immediately after JWE is done, we'll migrate to the Java 8 language features and classes, and that will constitute the first 1.0 release.

lhazlewood avatar Sep 09 '19 16:09 lhazlewood