Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary cast between long/double and floor call #296

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

jhorstmann
Copy link
Contributor

Calculating time / 1000 * 1000 already returns the correctly truncated result using long arithmetic

Calculating `time / 1000 * 1000` already returns the correctly truncated result using long arithmetic
@lbalmaceda
Copy link
Contributor

I think this was originally added either because the JDK7 compiler complained or because tests were randomly failing because of that +/- second change in the verification.

@jhorstmann
Copy link
Contributor Author

I could not find the historical commit that introduced the floor call, but if the tests were flaky that must have been for a different reason. The division and multiplication are happing with long type, so there is no fractional part that would be removed by the floor call.

Copy link
Contributor

@lbalmaceda lbalmaceda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@lbalmaceda lbalmaceda added this to the v3-Next milestone Oct 30, 2018
@lbalmaceda lbalmaceda merged commit f2c601b into auth0:master Oct 30, 2018
@lbalmaceda lbalmaceda modified the milestones: v3-Next, 3.5.0 Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants