replace return variable assignments with return statements

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2017-07-13 03:42:12 +00:00
parent d6c7e3e6a7
commit 4364dd5d02
1 changed files with 3 additions and 6 deletions

View File

@ -90,16 +90,13 @@ final class MathX {
}
private static double round(double n, int p, java.math.RoundingMode rounding) {
double retval;
if (Double.isNaN(n) || Double.isInfinite(n)) {
retval = Double.NaN;
return Double.NaN;
}
else {
retval = new java.math.BigDecimal(NumberToTextConverter.toText(n)).setScale(p, rounding).doubleValue();
final String excelNumber = NumberToTextConverter.toText(n);
return new java.math.BigDecimal(excelNumber).setScale(p, rounding).doubleValue();
}
return retval;
}