Skip to content

Commit

Permalink
Merge pull request #296 from jhorstmann/patch-1
Browse files Browse the repository at this point in the history
Remove unnecessary cast between long/double and floor call
  • Loading branch information
lbalmaceda authored Oct 30, 2018
2 parents 11dc653 + 92789bf commit f2c601b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/main/java/com/auth0/jwt/JWTVerifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ private void assertValidStringClaim(String claimName, String value, String expec

private void assertValidDateClaim(Date date, long leeway, boolean shouldBeFuture) {
Date today = clock.getToday();
today.setTime((long) Math.floor((today.getTime() / 1000) * 1000)); // truncate millis
today.setTime(today.getTime() / 1000 * 1000); // truncate millis
if (shouldBeFuture) {
assertDateIsFuture(date, leeway, today);
} else {
Expand Down

0 comments on commit f2c601b

Please sign in to comment.