poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50786] XSSFColor.getRgb() returns null for Excel 97-2003 indexed colors
Date Wed, 02 Mar 2011 15:00:23 GMT

Nick Burch <nick.burch@alfresco.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #6 from Nick Burch <nick.burch@alfresco.com> 2011-03-02 10:00:21 EST ---
(In reply to comment #5)
> HSSFColor.getIndexHash() method has comment:
> "this function returns all colors in a hastable.  Its not implemented as a
>  static member/staticly initialized because that would be dirty in a
>  server environment as it is intended.  This means you'll eat the time
>  it takes to create it once per request but you will not hold onto it
>  if you have none of those requests."

I think we should probably replace this with a lazy initialized static cache on
HSSFColor. That way your first call may be a little slow while it's built, but
all other calls on the server will then be fast.

My plan would be to have it return an immutable hash which is statically
cached, but also offer a 2nd method that will return a writable hash for anyone
currently doing anything odd

I could swap that round with the new method name for the static cache version,
and the old method name for the mutable one, if someone can think of a good
reason why to do it that way!

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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

View raw message