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

            Bug ID: 56595
           Summary: Review synchronization in DateUtil.isADateFormat(),
                    replace with ThreadLocals?
           Product: POI
           Version: 3.11-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: [email protected]
          Reporter: [email protected]

Copied over comment after resolving Bug 56563 (likely a result of
caching/synchronization added in Bug 55611):

----
Note that every call to DateUtil.isCellDateFormatted(a-numeric-cell) ends up in
a call to DateUtil.isADateFormat() which itself also maintains a static cache
of the last result and synchronizes on DateUtil.class.

In my case for example, the issue with the formatString arises by a call to
DateUtil.isCellDateFormatted(cell), so I still get monitor locks upon each call
even though you use thread locals for the style formatString cache. 

Seems like it would be a good idea to use the same strategy and switch the
DateUtil.isADateFormat() cache to be ThreadLocal based rather than
synchronization based.
----

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

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

Reply via email to