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 08a624f172
commit dc869e5e4a

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;
}