X Tutup
Skip to content

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

Merged
lbalmaceda merged 1 commit intoauth0:masterfrom
jhorstmann:patch-1
Oct 30, 2018
Merged

Remove unnecessary cast between long/double and floor call#296
lbalmaceda merged 1 commit intoauth0:masterfrom
jhorstmann:patch-1

Conversation

@jhorstmann
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

X Tutup