Handle null returns of coerceValueToBoolean

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1767474 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2016-11-01 10:52:20 +00:00
parent af2d473d00
commit 9d3094f11f

View File

@ -92,7 +92,7 @@ public final class Fixed implements Function1Arg, Function2Arg, Function3Arg {
// Format number conditionally using a thousands separator.
NumberFormat nf = NumberFormat.getNumberInstance(Locale.US);
DecimalFormat formatter = (DecimalFormat)nf;
formatter.setGroupingUsed(! skipThousandsSeparator);
formatter.setGroupingUsed(!(skipThousandsSeparator != null && skipThousandsSeparator));
formatter.setMinimumFractionDigits(places >= 0 ? places : 0);
formatter.setMaximumFractionDigits(places >= 0 ? places : 0);
String numberString = formatter.format(number.doubleValue());