You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/08/13 03:26:02 UTC

[Bug 54443] ClassCastException in HSSFOptimiser

https://issues.apache.org/bugzilla/show_bug.cgi?id=54443

--- Comment #4 from dzareba@hotmail.com ---
When there are duplicate cell styles ( i.e. via equals ), such that the later
one has been used, because with HSSFOptimiser.optimiseCellStyles the way it
works is that it removes the later duplicate but the earlier one wil also be
removed if it has not been "used". This will effectively remove duplicated
entries and mess up the records list.

I suggest to change HSSFOptimiser so slightly, as to say

isUsed[ newPos[ oldXf ] ] = true; for the part that removes unused styles, as
the used one is now always the very first of all duplicates, and to not set the
newPos[ duplicatedIndex ] to zero. I have tested it and no longer get an
exception in such scenarios.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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