mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
try to standardise div code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a8f1e7acd1
commit
ac3a104c82
@ -803,7 +803,7 @@ public class DataFormatter {
|
||||
if (obj instanceof BigDecimal) {
|
||||
obj = ((BigDecimal) obj).divide(divider, RoundingMode.HALF_UP);
|
||||
} else if (obj instanceof Double) {
|
||||
obj = (Double) obj / divider.doubleValue();
|
||||
obj = (new BigDecimal(NumberToTextConverter.toText((Double)obj))).divide(divider, RoundingMode.HALF_UP);
|
||||
} else {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user