mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
revert fraction format change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899870 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
31cce15e22
commit
3ed39620f6
@ -106,14 +106,8 @@ public class FractionFormat extends Format {
|
||||
|
||||
@SuppressWarnings("squid:S2111")
|
||||
public String format(Number num) {
|
||||
final double d = num.doubleValue();;
|
||||
try {
|
||||
//this is the recommended way (in BigDecimal javadocs to create a decimal from a double)
|
||||
return format(new BigDecimal(Double.toString(d)));
|
||||
} catch (NumberFormatException nfe) {
|
||||
//Double.toString can fail
|
||||
return format(d);
|
||||
}
|
||||
final double d = num.doubleValue();
|
||||
return format(new BigDecimal(d));
|
||||
}
|
||||
|
||||
@SuppressWarnings("squid:S2111")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user