pjfanning commented on code in PR #321:
URL: https://github.com/apache/poi/pull/321#discussion_r846096448


##########
poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java:
##########
@@ -950,7 +950,7 @@ private String getFormattedNumberString(Cell cell, 
ConditionalFormattingEvaluato
         if (numberFormat == null) {
             return String.valueOf(d);
         }
-        String formatted = numberFormat.format(d);
+        String formatted = numberFormat.format(new 
BigDecimal(String.valueOf(d)));

Review Comment:
   
https://github.com/apache/poi/commit/05e8a165430afd225e95a6db2dd793a959a46a10 - 
this test case I just added seems to behave as expected without the change you 
are suggesting
   
   POI is 20 year old code and if DataFormatter has a serious bug like the one 
you suggest it has then I'm surprised noone else has seen the problem 
(including me).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to