Hi,

In additional the following is now reported a few times:

java.lang.IllegalArgumentException: Cannot format given Object as a Number
        at java.base/java.text.DecimalFormat.format(DecimalFormat.java:518)
        at 
o.a.p.ss.usermodel.DataFormatter$InternalDecimalFormatWithScale.format(DataFormatter.java:827)
        at java.base/java.text.Format.format(Format.java:158)
        at 
o.a.p.ss.usermodel.DataFormatter.performDateFormatting(DataFormatter.java:901)
        at 
o.a.p.ss.usermodel.DataFormatter.getFormattedDateString(DataFormatter.java:942)
        at 
o.a.p.ss.usermodel.DataFormatter.formatCellValue(DataFormatter.java:1141)
        at 
o.a.p.ss.usermodel.DataFormatter.formatCellValue(DataFormatter.java:1082)
        at 
o.a.p.ss.usermodel.DataFormatter.formatCellValue(DataFormatter.java:1059)
        at o.a.p.hssf.usermodel.HSSFCell.toString(HSSFCell.java:1049)
        at 
o.a.p.stress.SpreadsheetHandler.readContent(SpreadsheetHandler.java:84)
        at 
o.a.p.stress.SpreadsheetHandler.handleWorkbook(SpreadsheetHandler.java:38)
        at o.a.p.stress.HSSFFileHandler.handleFile(HSSFFileHandler.java:43)

But this might be expected by the fixes for date-handling.

Regards... Dominik.

On Sun, Mar 23, 2025 at 9:16 AM Dominik Stadler <dominik.stad...@gmx.at>
wrote:

>
> Hi PJ,
>
> running regression tests showed a small number of cases where the the
> result of "XSSFCell.toString()" changes!
>
> Previously this method never returned null, but now it returns null in
> some cases:
>
> org.opentest4j.AssertionFailedError: expected: not <null>
> at
> org.apache.poi.stress.SpreadsheetHandler.readContent(SpreadsheetHandler.java:84)
> at
> org.apache.poi.stress.SpreadsheetHandler.handleWorkbook(SpreadsheetHandler.java:38)
> at
> org.apache.poi.stress.XSSFFileHandler.handleFile(XSSFFileHandler.java:103)
> at org.apache.poi.stress.XSSFFileHandler.test(XSSFFileHandler.java:225)
>
>
> Seems the following change is related:
> "refactor cell toString to use DataFormatter - git-svn-id:
> https://svn.apache.org/repos/asf/poi/trunk@1923790
> 13f79535-47bb-0310-9956-ffa450edef68"
>
> Difference seems to be in calls to
>                 return getRichStringCellValue().toString();
> before versus
>                 return cell.getRichStringCellValue().getString();
> now via DataFormatter.
>
>
> Additionally please note that "private static final DataFormatter
> DATA_FORMATTER" in XSSFCell is dangerous, DataFormatter() does not look
> thread-safe, so weird things could happen in some multi-threaded uses.
> Potentially same for HSSFCell and SXSSFCell.
>
>
> Regards... Dominik.
>
>
> On Fri, Mar 21, 2025 at 7:37 PM Dominik Stadler <dominik.stad...@gmx.at>
> wrote:
>
>> Yes, let's roll another release.
>>
>> I'll try to run the usual large corpus regression testing to check for
>> regressions over the weekend.
>>
>> Dominik.
>>
>> On Thu, Mar 20, 2025 at 10:09 PM PJ Fanning <fannin...@apache.org> wrote:
>>
>>> Hi everyone,
>>> Is it time for a POI 5.4.1 release?
>>>
>>> Changes
>>> https://github.com/apache/poi/compare/REL_5_4_0...HEAD
>>>
>>> I can act as release manager. If anyone else wants to do the release,
>>> get in touch and I can help.
>>>
>>> Regards,
>>> PJ
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
>>> For additional commands, e-mail: dev-h...@poi.apache.org
>>>
>>>

Reply via email to