commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-commons Wiki] Update of "CollectionsMysteriousNullPointerException" by RobertBurrellDonkin
Date Mon, 28 Nov 2005 22:03:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by RobertBurrellDonkin:
http://wiki.apache.org/jakarta-commons/CollectionsMysteriousNullPointerException

The comment on the change is:
Fixed a few typos

------------------------------------------------------------------------------
  
  The Collections 3.1 LRUMap has been reported to throw unexpected NullPointerException's.
What is mysterious is that these have only only ever been observed by a small number of users
in production code. Attempts to replicate this phenomenum under laboratory conditions have
(so far) failed.
  
- This map (as with the majority of the maps, collections and bags in commons-collections)
should be externally synchronized (by using - for example - Collections.synchronizeMap) when
used in a multithreaded environment. When not appropriately synchronized, our analysis of
the code indicates that NullPointerExceptions may be thrown. However, all those who have analysed
the code have yet to find a use case when a NullPointerException will be thrown when the map
is appropriately synchronized. 
+ This map (as with the majority of the maps, collections and bags in commons-collections)
should be externally synchronized (by using - for example - Collections.synchronizeMap) when
used in a multithreaded environment. When not appropriately synchronized, analysis of the
code indicates that NullPointerExceptions may be thrown. However, all those who have analysed
the code have yet to find a use case where a NullPointerException may be thrown when the map
is appropriately synchronized. 
  
  So far, a definitive cause eludes us. It may be that this issue is caused by inappropriate
synchronization or by problems with sychronization code in one or more JVMs. If you think
you can help us solve this mystery, please email the [http://jakarta.apache.org/site/mail.html
commons developer list] or edit this wiki page (at the bottom, if you please).
  

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


Mime
View raw message