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

Forbid Math.abs(int/long). #5562

Closed
wants to merge 1 commit into from
Closed

Commits on Mar 27, 2014

  1. Forbid Math.abs(int/long).

    We have had a couple of bugs because of the use of these methods without paying
    attention that it might return a negative value when provided with MIN_VALUE.
    There is one common and legitimate usage of this method in order to perform
    a modulo operation which would always return a positive number. This use-case
    has been extracted to MathUtils.mod.
    
    Close elastic#5562
    jpountz committed Mar 27, 2014
    Copy the full SHA
    143b67a View commit details
    Browse the repository at this point in the history