poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1231144 - /poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
Date Fri, 13 Jan 2012 16:03:17 GMT
Author: nick
Date: Fri Jan 13 16:03:17 2012
New Revision: 1231144

URL: http://svn.apache.org/viewvc?rev=1231144&view=rev
Log:
Correct fraction formatting quick return logic

Modified:
    poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java?rev=1231144&r1=1231143&r2=1231144&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java Fri Jan 13 16:03:17
2012
@@ -983,7 +983,7 @@ public class DataFormatter {
        public String format(Number num) {
           double wholePart = Math.floor(num.doubleValue());
           double decPart = num.doubleValue() - wholePart;
-          if (wholePart * decPart == 0) {
+          if (wholePart + decPart == 0) {
              return "0";
           }
           



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message