gerrit/gerrit-gwtui/src
Alice Kober-Sotzek 879d7cf6a5 FormatUtil: Correctly fix the Math#round() error flagged by error-prone
The fix applied by I1c88102d4 got rid of the error-prone warning but
missed to address the actual issue in that line of code. The intention
of the original code was to compute a double/float percentage and
mathematically round it to the next integer/long value. However, as
(long * int / long) == long, the computed percentage was a long value,
for which the floor operation was automatically applied. Hence, the
round function was even meaningless. The correct fix is to use a double
value in the operation so that the result is also of type double and
preserves all fractions.

By doing so, we also get rid of the error-prone warning, which only
indirectly hinted at that error.

Change-Id: Iea07a05281faf00b0b52cf25a2fd35ca25b069c5
2018-09-14 12:17:56 +00:00
..
main/java FormatUtil: Correctly fix the Math#round() error flagged by error-prone 2018-09-14 12:17:56 +00:00
test/java/com/google/gerrit/client/diff Format all Java files with google-java-format 2017-02-07 10:04:39 +09:00