Bug 47412

Summary: Concurrency issues in EscherProperties.initProps()
Product: POI Reporter: Josh Micich <josh>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://mail-archives.apache.org/mod_mbox/poi-dev/200906.mbox/<vmime.4a3f8400.783b.691282023e14ce0@mail3.24translate.de>

Description Josh Micich 2009-06-23 10:57:58 UTC
The field 'properties' on class EscherProperties is initialised lazily but there is nothing stopping a second thread reading the map while it is still being populated.  To be absolutely correct, some sort of synchronization is necessary.  Since this map initialisation is relatively simple and light-weight, there should be no problem with performing it in the class static initialiser.
Comment 1 Josh Micich 2009-06-23 11:12:57 UTC
Fixed in svn r787771

No junit added :( It's hard to write a deterministic tests that expose concurrency bugs. Hopefully the problem in the old version of the code is clear enough that the fix makes sense by itself.